|
![]() |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.openpermis.editor.policy.beans.PropertyAccess
public class PropertyAccess
Helper class that provides access to Java Bean properties.
Constructor Summary | |
---|---|
PropertyAccess(Object bean)
Creates a bean property access object for the specified Java Bean. |
Method Summary | |
---|---|
boolean |
canGetProperty(String property)
Check if the bean has a property that can be read. |
boolean |
canGetSetProperty(String property)
Check if the bean has a property that can be read and written. |
boolean |
canSetProperty(String property)
Check if the bean has a property that can be written. |
Object |
get(String property)
Calls the getter of the property of the bean bound to this access object. |
void |
set(String property,
Object value)
Calls the setter of the property of the bean bound to this access object. |
protected void |
warn(String message,
Throwable cause)
Logs a warning with the specified message and cause. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PropertyAccess(Object bean)
bean
- the Java Bean to operate on, must not be null
.Method Detail |
---|
protected void warn(String message, Throwable cause)
message
- the message to log.cause
- the cause.public boolean canGetProperty(String property)
property
- the property to check.
true
if the bean has the property and it can be read.public boolean canSetProperty(String property)
property
- the property to check.
true
if the bean has the property and it can be written.public boolean canGetSetProperty(String property)
property
- the property to check.
true
if the bean has the property and it can be read and written.public void set(String property, Object value)
property
- the property to set, must not be null
or empty.value
- the value to set at the bean, may (of course) be null
.
IllegalArgumentException
- if the bean does not have the property or the
value specified is of an incompatible type.
IllegalStateException
- if the bean reports an error.public Object get(String property)
property
- the property to request the value for, must not be null
or empty.
IllegalArgumentException
- if the bean does not have the property.
IllegalStateException
- if the bean reports an error.
|
![]() |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
PERMIS Role Based Access Control 0.4.0 (Build 15)
2009/05/20 08:15:11
Copyright (c) 2002-2007 Ergon Informatik AG