com.softwareag.mdm.service
Class AccessPermission

java.lang.Object
  extended bycom.softwareag.mdm.service.AccessPermission

public final class AccessPermission
extends Object

Defines the permission to see and modify a resource. The possible states are :


Method Summary
 char getFlag()
          Returns a char that identifies the type of this permission.
static AccessPermission getHidden()
          Factory method that specifies that a resource can neither be modified nor be displayed.
 String getLabel()
          Returns developer-friendly string.
static AccessPermission getReadOnly()
          Factory method that specifies that a resource may be displayed but it cannot modified.
static AccessPermission getReadOnly(UserMessage aReason)
          Factory method that specifies that a resource may be displayed but it cannot modified.
 UserMessage getReadOnlyReason()
          Only defined if this state is set as 'readOnly' and a specific reason is provided.
static AccessPermission getReadWrite()
          Factory method that specifies that a resource may be displayed and modified.
 boolean isHidden()
           
 boolean isReadOnly()
           
 boolean isReadWrite()
           
 AccessPermission max(AccessPermission anotherPermission)
          Returns the least restricted permission of this instance and the instance given as argument.
 AccessPermission min(AccessPermission anotherPermission)
          Returns the most restricted permission of this instance and the instance given as argument.
static AccessPermission parseFlag(char accessFlag)
          Factory method.
static AccessPermission parseFlag(String accessFlag)
          Factory method.
 String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

parseFlag

public static AccessPermission parseFlag(String accessFlag)
Factory method.

See Also:
parseFlag(char)

parseFlag

public static AccessPermission parseFlag(char accessFlag)
Factory method.

See Also:
parseFlag(String)

getReadWrite

public static AccessPermission getReadWrite()
Factory method that specifies that a resource may be displayed and modified.


getReadOnly

public static AccessPermission getReadOnly()
Factory method that specifies that a resource may be displayed but it cannot modified.


getReadOnly

public static AccessPermission getReadOnly(UserMessage aReason)
Factory method that specifies that a resource may be displayed but it cannot modified. The reason why resource cannot modified may be provided to the user.

Warning: the message is not always displayed in the current version of webMethods MDM.


getHidden

public static AccessPermission getHidden()
Factory method that specifies that a resource can neither be modified nor be displayed.


toString

public String toString()

isReadWrite

public boolean isReadWrite()

isReadOnly

public boolean isReadOnly()

isHidden

public boolean isHidden()

getReadOnlyReason

public UserMessage getReadOnlyReason()
Only defined if this state is set as 'readOnly' and a specific reason is provided.

See Also:
getReadOnly(UserMessage)

min

public AccessPermission min(AccessPermission anotherPermission)
Returns the most restricted permission of this instance and the instance given as argument.


max

public AccessPermission max(AccessPermission anotherPermission)
Returns the least restricted permission of this instance and the instance given as argument.


getFlag

public char getFlag()
Returns a char that identifies the type of this permission.


getLabel

public String getLabel()
Returns developer-friendly string.



(report a bug)
webMethods MDM 4.2.8 [0558]
Copyright Software AG 2000-2007. All rights reserved.