com.wles.blm
Class BLMDeclarationManager

java.lang.Object
  extended bycom.wles.blm.BLMComponentManager
      extended bycom.wles.blm.BLMDeclarationManager

public class BLMDeclarationManager
extends BLMComponentManager

Manages declarations of constants, attributes, custom enumeration types and evaluation functions. Unlike other ALES entities, declaration names are not case sensitive. i.e. abc == ABC. Use a BLMContextManager to obtain an instance of a BLMDeclarationManager.

See Also:
BLMContextManager

Field Summary
static int ATTRIBUTE_KIND_ALL
          Specifies any attribute kind.
static int ATTRIBUTE_KIND_DYNAMIC
          Specifies dynamic attributes.
static int ATTRIBUTE_KIND_RESOURCE
          Specifies resource attributes.
static int ATTRIBUTE_KIND_SUBJECT
          Specifies subject attributes.
static java.lang.String ATTRIBUTE_TYPE_BOOLEAN
          Specifies an attribute of type boolean.
static java.lang.String ATTRIBUTE_TYPE_DATE
          Specifies an attribute of type date.
static java.lang.String ATTRIBUTE_TYPE_INTEGER
          Specifies an attribute of type integer.
static java.lang.String ATTRIBUTE_TYPE_IP_ADDRESS
          Specifies an attribute of type IP address.
static java.lang.String ATTRIBUTE_TYPE_STRING
          Specifies an attribute of type string.
static java.lang.String ATTRIBUTE_TYPE_TIME
          Specifies an attribute of type time.
static int CATEGORY_ALL
          Specifies all declaration categories.
static int CATEGORY_ASI
          Specifies the ASI declaration category.
static int CATEGORY_BUILTIN
          Specifies the built-in declaration category.
static int CATEGORY_CUSTOM
          Specifies the custom declaration category.
static int CONSTANT_KIND_ALL
          Specifies any kind of constant declaration.
static int CONSTANT_KIND_PRIVILEGE
          Specifies privilege constant declarations.
static int CONSTANT_KIND_RESOURCE
          Speciifes resource constant declarations.
static int CONSTANT_KIND_SUBJECT
          Specifies subject constant declarations.
static int CONSTANT_KIND_SUBJECT_GROUP
          Specifies subject group constant declarations.
static java.lang.String DECLARATION_KIND_ALL
          Specifies any kind of declaration.
static java.lang.String DECLARATION_KIND_ATTRIBUTE
          Specifies declarations of attributes (credentials).
static java.lang.String DECLARATION_KIND_CONSTANT
          Specifies declarations of constants.
static java.lang.String DECLARATION_KIND_ENUMERATION
          Specifies declarations of enumerations.
static java.lang.String DECLARATION_KIND_EVALUATION_FUNCTION
          Specifies declarations of evaluation functions.
static int FILTER_BY_NAME
          Specifies to filter declarations by name.
static int FILTER_BY_TYPE
          Specifies to filter declarations by type.
static int FILTER_BY_VALUE
          Specifies to filter declarations by value.
 
Method Summary
 void create(java.lang.String kind, java.lang.String name, java.lang.String value)
          Creates a new declaration.
 java.lang.String filter(int byWhat, java.lang.String findPattern, java.lang.String declKind, int subKind, int category)
          Finds declarations matching the specified search criteria.
 boolean find(java.lang.String cID, java.lang.String name)
          Checks for a named declaration in a collection.
 int getCount(java.lang.String cID)
          Gets the size of a declaration collection.
 java.lang.String getKind(java.lang.String name)
          Gets the kind of a declaration.
 java.lang.String[] getReport(java.lang.String cID)
          Returns a report of the declarations in the specified collection.
 java.lang.String[] getReport(java.lang.String cID, int iStart, int iCount)
          Returns a report of the declarations in the specified collection.
 java.lang.String getType(java.lang.String name)
          Gets the type of an attribute or constant declaration
 java.lang.String getUseType(java.lang.String name)
          Get the useage model for a attribute declaration.
 java.lang.String getValue(java.lang.String name)
          Gets the value of a declaration.
 void release(java.lang.String cID)
          Releases a declaration collection.
 void remove(java.lang.String name)
          Removes a declaration.
 void rename(java.lang.String oldName, java.lang.String newName)
          Renames a declaration.
 void setUseageModel(java.lang.String name, int useage)
          Set the usage model for an attribute declaration
 void setValue(java.lang.String name, java.lang.String value)
          Sets value of a declaration.
 
Methods inherited from class com.wles.blm.BLMComponentManager
create, filter
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ATTRIBUTE_KIND_ALL

public static final int ATTRIBUTE_KIND_ALL
Specifies any attribute kind.

See Also:
Constant Field Values

ATTRIBUTE_KIND_DYNAMIC

public static final int ATTRIBUTE_KIND_DYNAMIC
Specifies dynamic attributes.

See Also:
Constant Field Values

ATTRIBUTE_KIND_RESOURCE

public static final int ATTRIBUTE_KIND_RESOURCE
Specifies resource attributes.

See Also:
Constant Field Values

ATTRIBUTE_KIND_SUBJECT

public static final int ATTRIBUTE_KIND_SUBJECT
Specifies subject attributes.

See Also:
Constant Field Values

ATTRIBUTE_TYPE_BOOLEAN

public static final java.lang.String ATTRIBUTE_TYPE_BOOLEAN
Specifies an attribute of type boolean.

See Also:
Constant Field Values

ATTRIBUTE_TYPE_DATE

public static final java.lang.String ATTRIBUTE_TYPE_DATE
Specifies an attribute of type date.

See Also:
Constant Field Values

ATTRIBUTE_TYPE_INTEGER

public static final java.lang.String ATTRIBUTE_TYPE_INTEGER
Specifies an attribute of type integer.

See Also:
Constant Field Values

ATTRIBUTE_TYPE_IP_ADDRESS

public static final java.lang.String ATTRIBUTE_TYPE_IP_ADDRESS
Specifies an attribute of type IP address.

See Also:
Constant Field Values

ATTRIBUTE_TYPE_STRING

public static final java.lang.String ATTRIBUTE_TYPE_STRING
Specifies an attribute of type string.

See Also:
Constant Field Values

ATTRIBUTE_TYPE_TIME

public static final java.lang.String ATTRIBUTE_TYPE_TIME
Specifies an attribute of type time.

See Also:
Constant Field Values

CATEGORY_ALL

public static final int CATEGORY_ALL
Specifies all declaration categories.

See Also:
Constant Field Values

CATEGORY_ASI

public static final int CATEGORY_ASI
Specifies the ASI declaration category.

See Also:
Constant Field Values

CATEGORY_BUILTIN

public static final int CATEGORY_BUILTIN
Specifies the built-in declaration category.

See Also:
Constant Field Values

CATEGORY_CUSTOM

public static final int CATEGORY_CUSTOM
Specifies the custom declaration category.

See Also:
Constant Field Values

CONSTANT_KIND_ALL

public static final int CONSTANT_KIND_ALL
Specifies any kind of constant declaration.

See Also:
Constant Field Values

CONSTANT_KIND_PRIVILEGE

public static final int CONSTANT_KIND_PRIVILEGE
Specifies privilege constant declarations.

See Also:
Constant Field Values

CONSTANT_KIND_RESOURCE

public static final int CONSTANT_KIND_RESOURCE
Speciifes resource constant declarations.

See Also:
Constant Field Values

CONSTANT_KIND_SUBJECT

public static final int CONSTANT_KIND_SUBJECT
Specifies subject constant declarations.

See Also:
Constant Field Values

CONSTANT_KIND_SUBJECT_GROUP

public static final int CONSTANT_KIND_SUBJECT_GROUP
Specifies subject group constant declarations.

See Also:
Constant Field Values

DECLARATION_KIND_ALL

public static final java.lang.String DECLARATION_KIND_ALL
Specifies any kind of declaration.

See Also:
Constant Field Values

DECLARATION_KIND_ATTRIBUTE

public static final java.lang.String DECLARATION_KIND_ATTRIBUTE
Specifies declarations of attributes (credentials).

See Also:
Constant Field Values

DECLARATION_KIND_CONSTANT

public static final java.lang.String DECLARATION_KIND_CONSTANT
Specifies declarations of constants.

See Also:
Constant Field Values

DECLARATION_KIND_ENUMERATION

public static final java.lang.String DECLARATION_KIND_ENUMERATION
Specifies declarations of enumerations.

See Also:
Constant Field Values

DECLARATION_KIND_EVALUATION_FUNCTION

public static final java.lang.String DECLARATION_KIND_EVALUATION_FUNCTION
Specifies declarations of evaluation functions.

See Also:
Constant Field Values

FILTER_BY_NAME

public static final int FILTER_BY_NAME
Specifies to filter declarations by name.

See Also:
Constant Field Values

FILTER_BY_TYPE

public static final int FILTER_BY_TYPE
Specifies to filter declarations by type.

See Also:
Constant Field Values

FILTER_BY_VALUE

public static final int FILTER_BY_VALUE
Specifies to filter declarations by value.

See Also:
Constant Field Values
Method Detail

create

public void create(java.lang.String kind,
                   java.lang.String name,
                   java.lang.String value)
            throws BLMException
Creates a new declaration.

Parameters:
kind - specifies the kind of declaration to create, one of: DECLARATION_KIND_CONSTANT, DECLARATION_KIND_ENUMERATION, DECLARATION_KIND_ATTRIBUTE, DECLARATION_KIND_EVALUATION_FUNCTION
name - name of the declaration
value - value of the declaration. If specifying a ASI string value, the value must be enclosed in double quotes. When declaring attributes this field specifies the attribute data type, and may be set to one of ATTRIBUTE_TYPE_STRING, ATTRIBUTE_TYPE_INTEGER, ATTRIBUTE_TYPE_BOOLEAN, ATTRIBUTE_TYPE_IP_ADDRESS, ATTRIBUTE_TYPE_DATE, ATTRIBUTE_TYPE_TIME or the name of a custom attribute enumeration type. When declaraing evaluation functions this field should be null.
Throws:
BLMException
See Also:
DECLARATION_KIND_CONSTANT, DECLARATION_KIND_ENUMERATION, DECLARATION_KIND_ATTRIBUTE, DECLARATION_KIND_EVALUATION_FUNCTION, ATTRIBUTE_TYPE_STRING, ATTRIBUTE_TYPE_INTEGER, ATTRIBUTE_TYPE_BOOLEAN, ATTRIBUTE_TYPE_IP_ADDRESS, ATTRIBUTE_TYPE_DATE, ATTRIBUTE_TYPE_TIME

filter

public java.lang.String filter(int byWhat,
                               java.lang.String findPattern,
                               java.lang.String declKind,
                               int subKind,
                               int category)
                        throws BLMException
Finds declarations matching the specified search criteria.

Parameters:
byWhat - what part of a declaration to filter by, one of: FILTER_BY_NAME, FILTER_BY_TYPE, FILTER_BY_VALUE
findPattern - Pattern for the filter
declKind - specifies the type of the declaration, one of: DECLARATION_KIND_CONSTANT, DECLARATION_KIND_ENUMERATION, DECLARATION_KIND_ATTRIBUTE, DECLARATION_KIND_EVALUATION_FUNCTION, DECLARATION_KIND_ALL
subKind - available only when declaraing attributes and constants, and is ignored for other search types. bitmask of of: CONSTANT_KIND_PRIVILEGE, CONSTANT_KIND_SUBJECT, CONSTANT_KIND_SUBJECT, CONSTANT_KIND_RESOURCE, CONSTANT_KIND_SUBJECT_GROUP, CONSTANT_KIND_ALL or ATTRIBUTE_KIND_DYNAMIC, ATTRIBUTE_KIND_SUBJECT, ATTRIBUTE_KIND_RESOURCE, ATTRIBUTE_KIND_ALL
category - bitmask of: CATEGORY_BUILTIN, CATEGORY_ASI, CATEGORY_CUSTOM, CATEGORY_ALL, specifies who created this declaration.
Returns:
declarations collection ID
Throws:
BLMException
See Also:
getReport(String cID), getReport(String cID, int iStart, int iCount), getCount(String CID), release(String cID), find(String cID, String name), FILTER_BY_NAME, FILTER_BY_TYPE, FILTER_BY_VALUE, DECLARATION_KIND_CONSTANT, DECLARATION_KIND_ENUMERATION, DECLARATION_KIND_ATTRIBUTE, DECLARATION_KIND_EVALUATION_FUNCTION, DECLARATION_KIND_ALL, CONSTANT_KIND_PRIVILEGE, CONSTANT_KIND_SUBJECT, CONSTANT_KIND_SUBJECT, CONSTANT_KIND_RESOURCE, CONSTANT_KIND_SUBJECT_GROUP, CONSTANT_KIND_ALL, ATTRIBUTE_KIND_DYNAMIC, ATTRIBUTE_KIND_SUBJECT, ATTRIBUTE_KIND_RESOURCE, ATTRIBUTE_KIND_ALL, CATEGORY_BUILTIN, CATEGORY_ASI, CATEGORY_CUSTOM, CATEGORY_ALL

find

public boolean find(java.lang.String cID,
                    java.lang.String name)
             throws BLMException
Checks for a named declaration in a collection.

Specified by:
find in class BLMComponentManager
Parameters:
cID - collection ID of the collection
name - name of the declaration
Returns:
found = true
Throws:
BLMException

getCount

public int getCount(java.lang.String cID)
             throws BLMException
Gets the size of a declaration collection.

Specified by:
getCount in class BLMComponentManager
Parameters:
cID - ID of the collection
Returns:
the size of the collection
Throws:
BLMException

getKind

public java.lang.String getKind(java.lang.String name)
                         throws BLMException
Gets the kind of a declaration.

Parameters:
name - name of the declaration
Returns:
kind of the declaration, one of: DECLARATION_KIND_CONSTANT, DECLARATION_KIND_ENUMERATION, DECLARATION_KIND_ATTRIBUTE, DECLARATION_KIND_EVALUATION_FUNCTION
Throws:
BLMException
See Also:
DECLARATION_KIND_CONSTANT, DECLARATION_KIND_ENUMERATION, DECLARATION_KIND_ATTRIBUTE, DECLARATION_KIND_EVALUATION_FUNCTION

getReport

public java.lang.String[] getReport(java.lang.String cID)
                             throws BLMException
Returns a report of the declarations in the specified collection.

Parameters:
cID - the collection id
Returns:
A String array of declaration names from the collection.
Throws:
BLMException

getReport

public java.lang.String[] getReport(java.lang.String cID,
                                    int iStart,
                                    int iCount)
                             throws BLMException
Returns a report of the declarations in the specified collection.

Parameters:
cID - the collection id
iStart - the start index to report on
iCount - the number of elements to include in the report
Returns:
A String array of declaration names from the collection.
Throws:
BLMException

getType

public java.lang.String getType(java.lang.String name)
                         throws BLMException
Gets the type of an attribute or constant declaration

Parameters:
name - name of the declaration
Returns:
type of the declaration, one of: one of: ATTRIBUTE_TYPE_STRING, ATTRIBUTE_TYPE_INTEGER, ATTRIBUTE_TYPE_BOOLEAN, ATTRIBUTE_TYPE_IP_ADDRESS, ATTRIBUTE_TYPE_DATE, ATTRIBUTE_TYPE_TIME or the name of a custom attribute enumeration type.
Throws:
BLMException
See Also:
ATTRIBUTE_TYPE_STRING, ATTRIBUTE_TYPE_INTEGER, ATTRIBUTE_TYPE_BOOLEAN, ATTRIBUTE_TYPE_IP_ADDRESS, ATTRIBUTE_TYPE_DATE, ATTRIBUTE_TYPE_TIME

getUseType

public java.lang.String getUseType(java.lang.String name)
                            throws BLMException
Get the useage model for a attribute declaration.

Parameters:
name - name of the declaration
Returns:
one of: ATTRIBUTE_KIND_DYNAMIC, ATTRIBUTE_KIND_SUBJECT, ATTRIBUTE_KIND_RESOURCE
Throws:
BLMException
See Also:
ATTRIBUTE_KIND_DYNAMIC, ATTRIBUTE_KIND_SUBJECT, ATTRIBUTE_KIND_RESOURCE

getValue

public java.lang.String getValue(java.lang.String name)
                          throws BLMException
Gets the value of a declaration.

Parameters:
name - name of the declaration
Returns:
value of the declaration. If the declaration is an attribute, the returned value contains the attributes type.
Throws:
BLMException

release

public void release(java.lang.String cID)
             throws BLMException
Releases a declaration collection. Supplying a null collection id will cause all held collections to be released.

Specified by:
release in class BLMComponentManager
Parameters:
cID - ID of the collection
Returns:
void
Throws:
BLMException

remove

public void remove(java.lang.String name)
            throws BLMException
Removes a declaration.

Specified by:
remove in class BLMComponentManager
Parameters:
name - name of the declaration to be removed
Throws:
BLMException

rename

public void rename(java.lang.String oldName,
                   java.lang.String newName)
            throws BLMException
Renames a declaration.

Specified by:
rename in class BLMComponentManager
Parameters:
oldName - old name of the declaration
newName - new name of the declaration
Throws:
BLMException

setUseageModel

public void setUseageModel(java.lang.String name,
                           int useage)
                    throws BLMException
Set the usage model for an attribute declaration

Parameters:
name - name of the credential declaration
useage - useage kind to be set, one of: ATTRIBUTE_KIND_DYNAMIC, ATTRIBUTE_KIND_SUBJECT, ATTRIBUTE_KIND_RESOURCE
Throws:
BLMException
See Also:
ATTRIBUTE_KIND_DYNAMIC, ATTRIBUTE_KIND_SUBJECT, ATTRIBUTE_KIND_RESOURCE

setValue

public void setValue(java.lang.String name,
                     java.lang.String value)
              throws BLMException
Sets value of a declaration.

Parameters:
name - name of the declaration
value - value to be set. If the declaration is an attribute this parameter specifies the attributes type, one of: ATTRIBUTE_TYPE_STRING, ATTRIBUTE_TYPE_INTEGER, ATTRIBUTE_TYPE_BOOLEAN, ATTRIBUTE_TYPE_IP_ADDRESS, ATTRIBUTE_TYPE_DATE, ATTRIBUTE_TYPE_TIME or the name of a custom attribute enumeration type.
Throws:
BLMException
See Also:
ATTRIBUTE_TYPE_STRING, ATTRIBUTE_TYPE_INTEGER, ATTRIBUTE_TYPE_BOOLEAN, ATTRIBUTE_TYPE_IP_ADDRESS, ATTRIBUTE_TYPE_DATE, ATTRIBUTE_TYPE_TIME


Copyright © 2005 BEA Systems Inc. All Rights Reserved.