com.microsoft.tfs.core.clients.security
Class SecurityNamespaceDescription

java.lang.Object
  extended by com.microsoft.tfs.core.internal.wrappers.WebServiceObjectWrapper
      extended by com.microsoft.tfs.core.clients.security.SecurityNamespaceDescription
All Implemented Interfaces:
java.lang.Cloneable

public class SecurityNamespaceDescription
extends com.microsoft.tfs.core.internal.wrappers.WebServiceObjectWrapper
implements java.lang.Cloneable

Class for describing the details of a SecurityNamespace

Thread-safety:
unknown

Field Summary
 
Fields inherited from class com.microsoft.tfs.core.internal.wrappers.WebServiceObjectWrapper
webServiceObject
 
Constructor Summary
SecurityNamespaceDescription(ms.ws._SecurityNamespaceDescription webServiceObject)
           
SecurityNamespaceDescription(com.microsoft.tfs.util.GUID namespaceId, java.lang.String name, java.lang.String displayName, java.lang.String databaseCategory, char separatorValue, int elementLength, SecurityNamespaceStructure structure, int writePermission, int readPermission, ActionDefinition[] actions)
          Creates a SecurityNamespaceDescription which can be used to create a SecurityNamespace
 
Method Summary
 SecurityNamespaceDescription clone()
           
 java.lang.String getActionDisplayNameForBitmask(int bitmask)
          Returns the action display name for the bitmask or String.Empty if the bitmask doesn't correspond to an action.
 java.lang.String getActionNameForBitmask(int bitmask)
          Returns the action name for the bitmask or String.Empty if the bitmask doesn't correspond to an action defined in this SecurityNamespace.
 ActionDefinition[] getActions()
          The list of actions that this SecurityNamespace is responsible for securing.
 int getBitmaskForAction(java.lang.String actionName)
          Returns the bit mask that corresponds to the action name or 0 if it is not an action defined in this SecurityNamespace.
 java.lang.String getDatabaseCategory()
          This is the database category that describes where the security information for this SecurityNamespace should be stored.
 java.lang.String getDisplayName()
          The display name for the SecurityNamespace.
 int getElementLength()
          If the security tokens this namespace will be operating on need to be split on certain character lengths to determine its elements, that length should be specified here.
 java.lang.String getName()
          The non-localized name for the SecurityNamespace that will be used for things like the command-line.
 com.microsoft.tfs.util.GUID getNamespaceId()
          The id that uniquely identifies the SecurityNamespace.
 SecurityNamespaceStructure getNamespaceStructure()
          The structure that this SecurityNamespace will use to organize its tokens.
 int getReadPermission()
          The permission bits needed by a user in order to read security data on the SecurityNamespace.
 char getSeparatorValue()
          If the security tokens this namespace will be operating on need to be split on certain characters to determine its elements that character should be specified here.
 ms.ws._SecurityNamespaceDescription getWebServiceObject()
          Gets the web service object this class wraps.
 int getWritePermission()
          The permission bits needed by a user in order to modify security data on the SecurityNamespace.
 
Methods inherited from class com.microsoft.tfs.core.internal.wrappers.WebServiceObjectWrapper
equals, hashCode, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SecurityNamespaceDescription

public SecurityNamespaceDescription(ms.ws._SecurityNamespaceDescription webServiceObject)

SecurityNamespaceDescription

public SecurityNamespaceDescription(com.microsoft.tfs.util.GUID namespaceId,
                                    java.lang.String name,
                                    java.lang.String displayName,
                                    java.lang.String databaseCategory,
                                    char separatorValue,
                                    int elementLength,
                                    SecurityNamespaceStructure structure,
                                    int writePermission,
                                    int readPermission,
                                    ActionDefinition[] actions)
Creates a SecurityNamespaceDescription which can be used to create a SecurityNamespace

Parameters:
namespaceId - The id that uniquely identifies the SecurityNamespace.
name - The non-localized name for the SecurityNamespace that will be used for things like the command-line.
displayName - The localized display name for the SecurityNamespace.
databaseCategory - This is the database category that describes where the security information for this SecurityNamespace should be stored.
separatorValue - If the security tokens this namespace will be operating on need to be split on certain characters to determine its elements that character should be specified here. If not, this value must be the null character.
elementLength - If the security tokens this namespace will be operating on need to be split on certain character lengths to determine its elements, that length should be specified here. If not, this value must be -1.
structure - The structure that this SecurityNamespace will use to organize its tokens. If this namespace is hierarchical, either the separatorValue or the elementLength parameter must have a non-default value.
writePermission - The permission bits needed by a user in order to modify security data in this SecurityNamespace.
readPermission - The permission bits needed by a user in order to read security data in this SecurityNamespace.
actions - The list of actions that this SecurityNamespace is responsible for securing.
Method Detail

getWebServiceObject

public ms.ws._SecurityNamespaceDescription getWebServiceObject()
Gets the web service object this class wraps. The returned object should not be modified.

Returns:
the web service object this class wraps.

getNamespaceStructure

public SecurityNamespaceStructure getNamespaceStructure()
The structure that this SecurityNamespace will use to organize its tokens.


getDisplayName

public java.lang.String getDisplayName()
The display name for the SecurityNamespace.


getNamespaceId

public com.microsoft.tfs.util.GUID getNamespaceId()
The id that uniquely identifies the SecurityNamespace.


getName

public java.lang.String getName()
The non-localized name for the SecurityNamespace that will be used for things like the command-line.


getSeparatorValue

public char getSeparatorValue()
If the security tokens this namespace will be operating on need to be split on certain characters to determine its elements that character should be specified here. If not, this value will be the null character.


getElementLength

public int getElementLength()
If the security tokens this namespace will be operating on need to be split on certain character lengths to determine its elements, that length should be specified here. If not, this value will be -1.


getWritePermission

public int getWritePermission()
The permission bits needed by a user in order to modify security data on the SecurityNamespace.


getReadPermission

public int getReadPermission()
The permission bits needed by a user in order to read security data on the SecurityNamespace.


getDatabaseCategory

public java.lang.String getDatabaseCategory()
This is the database category that describes where the security information for this SecurityNamespace should be stored.


getActions

public ActionDefinition[] getActions()
The list of actions that this SecurityNamespace is responsible for securing.


getBitmaskForAction

public int getBitmaskForAction(java.lang.String actionName)
Returns the bit mask that corresponds to the action name or 0 if it is not an action defined in this SecurityNamespace.

Parameters:
actionName - The non-localized name for the action.
Returns:
The bit mask that corresponds to the action name or 0 if it is not an action defined in this namespace.

getActionNameForBitmask

public java.lang.String getActionNameForBitmask(int bitmask)
Returns the action name for the bitmask or String.Empty if the bitmask doesn't correspond to an action defined in this SecurityNamespace.

Parameters:
bitmask - The bitmask for a single permission whose action name should be returned. Note, the bitmask should only apply to one action. If 1 = Read and 2 = Write then 1 and 2 are valid values but 3 is not.
Returns:
The action name for the bitmask or String.Empty if the bitmask doesn't correspond to an action defined in this SecurityNamespace.

getActionDisplayNameForBitmask

public java.lang.String getActionDisplayNameForBitmask(int bitmask)
Returns the action display name for the bitmask or String.Empty if the bitmask doesn't correspond to an action.

Parameters:
bitmask - The bitmask for a single permission whose action display name should be returned. Note, the bitmask should only apply to one action. If 1 = Read and 2 = Write then 1 and 2 are valid values but 3 is not.
Returns:
The action display name for the bitmask or String.Empty if the bitmask doesn't correspond to an action.

clone

public SecurityNamespaceDescription clone()
Overrides:
clone in class java.lang.Object
Returns:
Returns a copy of the description.


© 2015 Microsoft. All rights reserved.