|
uPortal 2.4.1 API Documentation |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jasig.portal.security.provider.AuthorizationPrincipalImpl
Constructor Summary | |
AuthorizationPrincipalImpl(java.lang.String newKey,
java.lang.Class newType)
Constructor for ReferenceAuthorizationPrincipal. |
|
AuthorizationPrincipalImpl(java.lang.String newKey,
java.lang.Class newType,
IAuthorizationService authService)
Constructor for ReferenceAuthorizationPrincipal. |
Method Summary | |
boolean |
canPublish()
Answers if this IAuthorizationPrincipal has permission to publish. |
boolean |
canRender(int channelPublishId)
Answers if this IAuthorizationPrincipal has permission to render this channel. |
boolean |
canSubscribe(int channelPublishId)
Answers if this IAuthorizationPrincipal has permission to subscribe to this channel. |
boolean |
equals(java.lang.Object obj)
Compares two objects for equality. |
IPermission[] |
getAllPermissions()
Returns the IPermissions for this IAuthorizationPrincipal , including
inherited IPermissions . |
IPermission[] |
getAllPermissions(java.lang.String owner,
java.lang.String activity,
java.lang.String target)
Returns the IPermissions for this IAuthorizationPrincipal for the
specified owner , activity and target . |
java.util.Vector |
getAuthorizedChannels()
Return a Vector of IChannels. |
java.lang.String |
getKey()
Returns the key of the underlying entity. |
IPermission[] |
getPermissions()
Returns the IPermissions for this IAuthorizationPrincipal . |
IPermission[] |
getPermissions(java.lang.String owner,
java.lang.String activity,
java.lang.String target)
Returns the IPermissions for this IAuthorizationPrincipal for the
specified owner , activity and target . |
java.lang.String |
getPrincipalString()
|
java.lang.Class |
getType()
Return the Type of the underlying entity. |
int |
hashCode()
Generates a hash code for the receiver. |
boolean |
hasPermission(java.lang.String owner,
java.lang.String activity,
java.lang.String target)
Answers if this IAuthorizationPrincipal has permission to perform the
activity on the target . |
boolean |
hasPermission(java.lang.String owner,
java.lang.String activity,
java.lang.String target,
IPermissionPolicy policy)
Answers if this IAuthorizationPrincipal has permission to perform the
activity on the target , as evaluated by the
policy . |
java.lang.String |
toString()
Returns a String that represents the value of this object. |
Methods inherited from class java.lang.Object |
getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public AuthorizationPrincipalImpl(java.lang.String newKey, java.lang.Class newType)
public AuthorizationPrincipalImpl(java.lang.String newKey, java.lang.Class newType, IAuthorizationService authService)
Method Detail |
public boolean canPublish() throws AuthorizationException
IAuthorizationPrincipal
has permission to publish.
canPublish
in interface IAuthorizationPrincipal
AuthorizationException
- thrown when authorization information could not be retrieved.public boolean canRender(int channelPublishId) throws AuthorizationException
IAuthorizationPrincipal
has permission to render this channel.
canRender
in interface IAuthorizationPrincipal
channelPublishId
- int - the Channel publish ID
AuthorizationException
- thrown when authorization information could not be retrieved.public boolean canSubscribe(int channelPublishId) throws AuthorizationException
IAuthorizationPrincipal
has permission to subscribe to this channel.
canSubscribe
in interface IAuthorizationPrincipal
channelPublishId
- int - the Channel publish ID
AuthorizationException
- thrown when authorization information could not be retrieved.public boolean equals(java.lang.Object obj)
obj
- the Object to compare with
Hashtable
public IPermission[] getAllPermissions() throws AuthorizationException
IPermissions
for this IAuthorizationPrincipal
, including
inherited IPermissions
.
getAllPermissions
in interface IAuthorizationPrincipal
AuthorizationException
- indicates authorization information could not
be retrieved.public IPermission[] getAllPermissions(java.lang.String owner, java.lang.String activity, java.lang.String target) throws AuthorizationException
IPermissions
for this IAuthorizationPrincipal
for the
specified owner
, activity
and target
. Inherited
IPermissions
are included. Null parameters are ignored, so
getPermissions(null, null, null)
should retrieve all IPermissions
for an IAuthorizationPrincipal
.
getAllPermissions
in interface IAuthorizationPrincipal
owner
- java.lang.Stringactivity
- java.lang.Stringtarget
- java.lang.String
AuthorizationException
- indicates authorization information could not
be retrieved.public java.util.Vector getAuthorizedChannels() throws AuthorizationException
getAuthorizedChannels
in interface IAuthorizationPrincipal
java.util.Vector
of IChannels
AuthorizationException
- indicates authorization information could not be retrieved.public java.lang.String getKey()
IAuthorizationPrincipal
getKey
in interface IAuthorizationPrincipal
public IPermission[] getPermissions() throws AuthorizationException
IPermissions
for this IAuthorizationPrincipal
.
getPermissions
in interface IAuthorizationPrincipal
AuthorizationException
- indicates authorization information could not
be retrieved.public IPermission[] getPermissions(java.lang.String owner, java.lang.String activity, java.lang.String target) throws AuthorizationException
IPermissions
for this IAuthorizationPrincipal
for the
specified owner
, activity
and target
. Null parameters
are ignored, so getPermissions(null, null, null)
should retrieve all
IPermissions
for an IAuthorizationPrincipal
.
getPermissions
in interface IAuthorizationPrincipal
owner
- java.lang.Stringactivity
- java.lang.Stringtarget
- java.lang.String
AuthorizationException
- indicates authorization information could not
be retrieved.public java.lang.String getPrincipalString()
getPrincipalString
in interface IAuthorizationPrincipal
public java.lang.Class getType()
IAuthorizationPrincipal
getType
in interface IAuthorizationPrincipal
public int hashCode()
Hashtable
public boolean hasPermission(java.lang.String owner, java.lang.String activity, java.lang.String target) throws AuthorizationException
IAuthorizationPrincipal
has permission to perform the
activity
on the target
. Params owner
and
activity
must be non-null. If target
is null, then the
target is not checked.
hasPermission
in interface IAuthorizationPrincipal
owner
- java.lang.Stringactivity
- java.lang.Stringtarget
- java.lang.String
AuthorizationException
- indicates authorization information could not
be retrieved.public java.lang.String toString()
public boolean hasPermission(java.lang.String owner, java.lang.String activity, java.lang.String target, IPermissionPolicy policy) throws AuthorizationException
IAuthorizationPrincipal
has permission to perform the
activity
on the target
, as evaluated by the
policy
. Params policy
, owner
and
activity
must be non-null.
hasPermission
in interface IAuthorizationPrincipal
owner
- java.lang.Stringactivity
- java.lang.Stringtarget
- java.lang.Stringpolicy
- org.jasig.portal.security.IPermissionPolicy
AuthorizationException
- indicates authorization information could not
be retrieved.
|
uPortal 2.4.1 API Documentation |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |