Apache CXF API

org.apache.cxf.rs.security.oauth2.common
Class Permission

java.lang.Object
  extended by org.apache.cxf.rs.security.oauth2.common.Permission
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
OAuthPermission

public class Permission
extends Object
implements Serializable

Base permission description

See Also:
OAuthAuthorizationData, Serialized Form

Constructor Summary
Permission()
           
Permission(String permission, String description)
           
 
Method Summary
 String getDescription()
          Gets the permission description
 String getPermission()
          Get the permission value such as "read_calendar"
 boolean isDefault()
           
 void setDefault(boolean value)
          Indicates if this permission has been allocated by default or not.
 void setDescription(String description)
          Sets the permission description
 void setPermission(String permission)
          Sets the permission value such as "read_calendar"
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Permission

public Permission()

Permission

public Permission(String permission,
                  String description)
Method Detail

getDescription

public String getDescription()
Gets the permission description

Returns:
the description

setDescription

public void setDescription(String description)
Sets the permission description

Parameters:
description -

getPermission

public String getPermission()
Get the permission value such as "read_calendar"

Returns:
the value

setPermission

public void setPermission(String permission)
Sets the permission value such as "read_calendar"

Parameters:
permission - the permission value

setDefault

public void setDefault(boolean value)
Indicates if this permission has been allocated by default or not. Authorization View handlers may use this property to optimize the way the user selects the scopes. For example, assume that read', 'add' and 'update' scopes are supported and the 'read' scope is always allocated. This can be presented at the UI level as follows: the read-only check-box control will represent a 'read' scope and a user will be able to optionally select 'add' and/or 'update' scopes, in addition to the default 'read' one.

Parameters:
isDefault - true if the permission has been allocated by default

isDefault

public boolean isDefault()

Apache CXF API

Apache CXF