|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.wamblee.persistence.AbstractPersistent
org.wamblee.security.authorization.UrlAuthorizationRule
public abstract class UrlAuthorizationRule
Utility base class for implementation of authentication rules based on the
getResourcePath(Object).
Whether a path is appropriate is determined by a
PathCondition.
UserCondition.
OperationCondition.
| Constructor Summary | |
|---|---|
protected |
UrlAuthorizationRule()
For OR mapping. |
protected |
UrlAuthorizationRule(AuthorizationResult aResult,
UserCondition aUserCondition,
PathCondition aPathCondition,
java.lang.Class aResourceClass,
OperationCondition aOperationCondition)
Constructs an authorization rule. |
protected |
UrlAuthorizationRule(java.lang.Class aResourceClass)
For OR mapping. |
| Method Summary | |
|---|---|
protected java.lang.String |
getAuthorizationResultString()
Gets the authorization result for OR mapping. |
OperationCondition |
getOperationCondition()
|
PathCondition |
getPathCondition()
|
protected java.lang.String |
getResourceClassName()
|
protected abstract java.lang.String |
getResourcePath(java.lang.Object aResource)
Gets the path of the resource. |
java.lang.Class[] |
getSupportedTypes()
Returns the supported object types for which this authorization rule applies. |
UserCondition |
getUserCondition()
|
AuthorizationResult |
isAllowed(java.lang.Object aResource,
Operation anOperation,
User aUser)
Determines whether an operation is allowed on a certain resource. |
protected AuthorizationResult |
isAllowed(java.lang.String aPath,
Operation aOperation,
User aUser)
Determines if the operation is allowed on the resource. |
protected void |
setAuthorizationResultString(java.lang.String aResult)
Sets the authorization result, for OR mapping. |
protected void |
setOperationCondition(OperationCondition aOperationCondition)
|
protected void |
setPathCondition(PathCondition aPathCondition)
|
protected void |
setResourceClassName(java.lang.String aResourceClass)
|
protected void |
setUserCondition(UserCondition aUserCondition)
|
java.lang.String |
toString()
|
| Methods inherited from class org.wamblee.persistence.AbstractPersistent |
|---|
getPersistedVersion, getPrimaryKey, setPersistedVersion, setPrimaryKey |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.wamblee.persistence.Persistent |
|---|
getPersistedVersion, getPrimaryKey, setPersistedVersion, setPrimaryKey |
| Constructor Detail |
|---|
protected UrlAuthorizationRule(AuthorizationResult aResult,
UserCondition aUserCondition,
PathCondition aPathCondition,
java.lang.Class aResourceClass,
OperationCondition aOperationCondition)
aResult - Result of the authorization when the path and group match.aUserCondition - Condition to match users.aPathCondition - Condition to match paths with.aResourceClass - Supported resource class this is for.aOperationCondition - Condition to match the operation with.protected UrlAuthorizationRule(java.lang.Class aResourceClass)
protected UrlAuthorizationRule()
| Method Detail |
|---|
public java.lang.Class[] getSupportedTypes()
AuthorizationRule
getSupportedTypes in interface AuthorizationRule
public AuthorizationResult isAllowed(java.lang.Object aResource,
Operation anOperation,
User aUser)
AuthorizationRuleAuthorizationResult.UNSUPPORTED_RESOURCE.
isAllowed in interface AuthorizationRuleaResource - Resource.anOperation - Operation.aUser - Current user.
protected AuthorizationResult isAllowed(java.lang.String aPath,
Operation aOperation,
User aUser)
aPath - Path of the resource.aOperation - Operation to be done.aUser - Currently logged in user or null if no user is logged in.
protected abstract java.lang.String getResourcePath(java.lang.Object aResource)
aResource - Resource, guaranteed to be an instance of
_resourceClass.
public java.lang.String toString()
toString in class java.lang.Objectprotected java.lang.String getAuthorizationResultString()
protected void setAuthorizationResultString(java.lang.String aResult)
aResult - Result.protected java.lang.String getResourceClassName()
protected void setResourceClassName(java.lang.String aResourceClass)
public OperationCondition getOperationCondition()
protected void setOperationCondition(OperationCondition aOperationCondition)
aOperationCondition - The _operationCondition to set.public PathCondition getPathCondition()
protected void setPathCondition(PathCondition aPathCondition)
aPathCondition - The _pathCondition to set.public UserCondition getUserCondition()
protected void setUserCondition(UserCondition aUserCondition)
aUserCondition - The _userCondition to set.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||