public class SecurityMemberAccess extends Object implements ognl.MemberAccess
Constructor and Description |
---|
SecurityMemberAccess(boolean allowStaticMethodAccess,
boolean allowStaticFieldAccess)
SecurityMemberAccess
- access decisions based on whether member is static (or not)
- block or allow access to properties (configurable-after-construction)
|
Modifier and Type | Method and Description |
---|---|
protected boolean |
checkEnumAccess(Object target,
Member member) |
protected boolean |
checkPublicMemberAccess(int memberModifiers)
Check access for public members (via modifiers)
Returns true if-and-only-if the member is public.
|
protected boolean |
checkStaticFieldAccess(Member member,
int memberModifiers)
Check access for static field (via modifiers).
|
protected boolean |
checkStaticMethodAccess(Member member,
int memberModifiers)
Check access for static method (via modifiers).
|
boolean |
getAllowStaticFieldAccess() |
boolean |
getAllowStaticMethodAccess() |
protected boolean |
isAcceptableProperty(String name) |
protected boolean |
isAccepted(String paramName) |
boolean |
isAccessible(Map context,
Object target,
Member member,
String propertyName) |
protected boolean |
isClassExcluded(Class<?> clazz) |
protected boolean |
isExcluded(String paramName) |
protected boolean |
isPackageExcluded(Package targetPackage,
Package memberPackage) |
void |
restore(Map context,
Object target,
Member member,
String propertyName,
Object state) |
void |
setAcceptProperties(Set<Pattern> acceptedProperties) |
void |
setDisallowProxyMemberAccess(boolean disallowProxyMemberAccess) |
void |
setExcludedClasses(Set<Class<?>> excludedClasses) |
void |
setExcludedPackageNamePatterns(Set<Pattern> excludedPackageNamePatterns) |
void |
setExcludedPackageNames(Set<String> excludedPackageNames) |
void |
setExcludeProperties(Set<Pattern> excludeProperties) |
Object |
setup(Map context,
Object target,
Member member,
String propertyName) |
public SecurityMemberAccess(boolean allowStaticMethodAccess, boolean allowStaticFieldAccess)
allowStaticMethodAccess
- allowStaticFieldAccess
- public final boolean getAllowStaticMethodAccess()
public final boolean getAllowStaticFieldAccess()
public Object setup(Map context, Object target, Member member, String propertyName)
setup
in interface ognl.MemberAccess
public void restore(Map context, Object target, Member member, String propertyName, Object state)
restore
in interface ognl.MemberAccess
public boolean isAccessible(Map context, Object target, Member member, String propertyName)
isAccessible
in interface ognl.MemberAccess
protected boolean checkStaticMethodAccess(Member member, int memberModifiers)
member
- memberModifiers
- protected boolean checkStaticFieldAccess(Member member, int memberModifiers)
member
- memberModifiers
- protected boolean checkPublicMemberAccess(int memberModifiers)
memberModifiers
- protected boolean isClassExcluded(Class<?> clazz)
protected boolean isAcceptableProperty(String name)
protected boolean isAccepted(String paramName)
protected boolean isExcluded(String paramName)
public void setExcludedPackageNamePatterns(Set<Pattern> excludedPackageNamePatterns)
public void setDisallowProxyMemberAccess(boolean disallowProxyMemberAccess)
Copyright © 2000–2020 Apache Software Foundation. All rights reserved.