Package ognl
Class DefaultMemberAccess
java.lang.Object
ognl.DefaultMemberAccess
- All Implemented Interfaces:
ognl.MemberAccess
This class provides methods for setting up and restoring
access in a Field. Java 2 provides access utilities for setting
and getting fields that are non-public. This object provides
coarse-grained access controls to allow access to private, protected
and package protected members. This will apply to all classes
and members.
-
Field Summary
FieldsModifier and TypeFieldDescriptionbooleanbooleanboolean -
Constructor Summary
ConstructorsConstructorDescriptionDefaultMemberAccess(boolean allowAllAccess) DefaultMemberAccess(boolean allowPrivateAccess, boolean allowProtectedAccess, boolean allowPackageProtectedAccess) -
Method Summary
Modifier and TypeMethodDescriptionbooleanbooleanbooleanbooleanisAccessible(ognl.OgnlContext context, Object target, Member member, String propertyName) Returns true if the given member is accessible or can be made accessible by this object.voidvoidsetAllowPackageProtectedAccess(boolean value) voidsetAllowPrivateAccess(boolean value) voidsetAllowProtectedAccess(boolean value)
-
Field Details
-
allowPrivateAccess
public boolean allowPrivateAccess -
allowProtectedAccess
public boolean allowProtectedAccess -
allowPackageProtectedAccess
public boolean allowPackageProtectedAccess
-
-
Constructor Details
-
DefaultMemberAccess
public DefaultMemberAccess(boolean allowAllAccess) -
DefaultMemberAccess
public DefaultMemberAccess(boolean allowPrivateAccess, boolean allowProtectedAccess, boolean allowPackageProtectedAccess)
-
-
Method Details
-
getAllowPrivateAccess
public boolean getAllowPrivateAccess() -
setAllowPrivateAccess
public void setAllowPrivateAccess(boolean value) -
getAllowProtectedAccess
public boolean getAllowProtectedAccess() -
setAllowProtectedAccess
public void setAllowProtectedAccess(boolean value) -
getAllowPackageProtectedAccess
public boolean getAllowPackageProtectedAccess() -
setAllowPackageProtectedAccess
public void setAllowPackageProtectedAccess(boolean value) -
setup
- Specified by:
setupin interfaceognl.MemberAccess
-
restore
public void restore(ognl.OgnlContext context, Object target, Member member, String propertyName, Object state) - Specified by:
restorein interfaceognl.MemberAccess
-
isAccessible
public boolean isAccessible(ognl.OgnlContext context, Object target, Member member, String propertyName) Returns true if the given member is accessible or can be made accessible by this object.- Specified by:
isAccessiblein interfaceognl.MemberAccess- Parameters:
context- the current execution context (not used).target- the Object to test accessibility for (not used).member- the Member to test accessibility for.propertyName- the property to test accessibility for (not used).- Returns:
- true if the member is accessible in the context, false otherwise.
-