com.ace.moab.api.credential
Enum CredentialType

java.lang.Object
  extended by java.lang.Enum<CredentialType>
      extended by com.ace.moab.api.credential.CredentialType
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<CredentialType>

public enum CredentialType
extends java.lang.Enum<CredentialType>

This enum represents a credential type such as user, group account, class, or qos.

Other information stored in this enum include the following:


Enum Constant Summary
ACCOUNT
           
CLASS_OF_SERVICE
           
CLUSTER
           
GROUP
           
NOT_SPECIFIED
           
QOS
           
USER
           
 
Method Summary
static java.util.Vector<java.lang.String> convertCredentialTypesToStrings(java.util.Vector<CredentialType> credTypes)
          Converts a Vector of CredentialTypes to a vector of strings, where each string is a string representation of one of the credentialTypes in the input vector.
static java.util.Vector<CredentialType> getChildCredTypes()
          Returns the credential types that are potential child credentials.
static java.util.Vector<CredentialType> getParentCredTypes()
          Returns the credential types that are potential parent, or grouping credentials.
static java.util.Vector<CredentialType> getStandardCredentialType()
          Returns the standard credential types used throughout most of MCM (i.e.
static java.util.Vector<java.lang.String> getStandardCredentialTypeShorthandStrings()
          Returns the short hand strings for the credential types used throughout most of MCM (i.e.
static java.util.Vector<java.lang.String> getStandardCredentialTypeStrings()
          Returns the standard credential types used throughout most of MCM (i.e.
static CredentialType parseCredentialTypeString(java.lang.String credentialTypeString)
          Converts a string like "user" to it's corresponding CredentialType enum constant.
 java.lang.String toHelpString()
          Return a string which is used to build the tag to reference help documentation.
 com.moab.api.scheduler.MoabObjectType toMoabObjectType()
          Return the MoabObjectType that is equivalent to this CredentialType.
 java.lang.String toShortHandString()
          Returns the CredentialType in a short hand string representation.
 java.lang.String toString()
          Returns this credential type as a String.
 java.lang.String toXMLConstant()
           
static CredentialType valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static CredentialType[] values()
          Returns an array containing the constants of this enum type, in the order they're declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, getDeclaringClass, hashCode, name, ordinal, valueOf
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

USER

public static final CredentialType USER

GROUP

public static final CredentialType GROUP

ACCOUNT

public static final CredentialType ACCOUNT

CLASS_OF_SERVICE

public static final CredentialType CLASS_OF_SERVICE

QOS

public static final CredentialType QOS

CLUSTER

public static final CredentialType CLUSTER

NOT_SPECIFIED

public static final CredentialType NOT_SPECIFIED
Method Detail

values

public static final CredentialType[] values()
Returns an array containing the constants of this enum type, in the order they're declared. This method may be used to iterate over the constants as follows:
for(CredentialType c : CredentialType.values())
        System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they're declared

valueOf

public static CredentialType valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
java.lang.IllegalArgumentException - if this enum type has no constant with the specified name

toString

public java.lang.String toString()
Returns this credential type as a String.

Overrides:
toString in class java.lang.Enum<CredentialType>
Returns:
this credential type as a String.

toShortHandString

public java.lang.String toShortHandString()
Returns the CredentialType in a short hand string representation.

Returns:
the CredentialType in a short hand string representation.

toHelpString

public java.lang.String toHelpString()
Return a string which is used to build the tag to reference help documentation.

Returns:
the help string for documentation

toXMLConstant

public java.lang.String toXMLConstant()
Returns:
the xml constant string that corresponds to this credential type

toMoabObjectType

public com.moab.api.scheduler.MoabObjectType toMoabObjectType()
Return the MoabObjectType that is equivalent to this CredentialType.

Returns:
equivalent MoabObjectType

getChildCredTypes

public static java.util.Vector<CredentialType> getChildCredTypes()
Returns the credential types that are potential child credentials. In other words, these are credentials that can be grouped into categories determined by other credentials. For example, users can be grouped into groups or accounts, but accounts can't really be grouped into classes of service. Thus user is a child credential type, and account isn't.

Returns:
all possible child credentials.

getParentCredTypes

public static java.util.Vector<CredentialType> getParentCredTypes()
Returns the credential types that are potential parent, or grouping credentials. For example, accounts can be used to group users, but users can't really be used to group accounts. Thus account is a parent credential and user isn't.

Returns:
all possible parent credentials.

getStandardCredentialTypeStrings

public static java.util.Vector<java.lang.String> getStandardCredentialTypeStrings()
Returns the standard credential types used throughout most of MCM (i.e. user, group, account, class of service, and QoS) represented as strings.

Returns:
the standard credential types represented as strings.

getStandardCredentialTypeShorthandStrings

public static java.util.Vector<java.lang.String> getStandardCredentialTypeShorthandStrings()
Returns the short hand strings for the credential types used throughout most of MCM (i.e. user, group, account, class of service, and QoS).

Returns:
the standard credential types represented as short hand strings.

getStandardCredentialType

public static java.util.Vector<CredentialType> getStandardCredentialType()
Returns the standard credential types used throughout most of MCM (i.e. user, group, account, class of service, and QoS).

Returns:
the standard credential types.

parseCredentialTypeString

public static CredentialType parseCredentialTypeString(java.lang.String credentialTypeString)
Converts a string like "user" to it's corresponding CredentialType enum constant. This conversion is case insensitive.

Parameters:
credentialTypeString - should be "user", "group", etc.
Returns:
the corresponding CredentialType enum constant.

convertCredentialTypesToStrings

public static java.util.Vector<java.lang.String> convertCredentialTypesToStrings(java.util.Vector<CredentialType> credTypes)
Converts a Vector of CredentialTypes to a vector of strings, where each string is a string representation of one of the credentialTypes in the input vector.

Parameters:
credTypes - the CredentialType enum constants to convert to Strings.
Returns:
a Vector of the CredentialTypes converted to Strings.


Copyright © 2001-2009 Cluster Resources, Inc. All Rights Reserved.