com.wles.blm
Class BLMPrivgrpManager

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

public class BLMPrivgrpManager
extends BLMComponentManager

Manages operations on privilege groups. Privilege groups can be used to maintain associations between a set of related privileges. For instance you may create a privilege group for all privileges which apply to a given resource or application. Use a BLMContextManager to obtain an instance of a BLMPrivgrpManager.

See Also:
BLMContextManager

Method Summary
 void addPrivilegeToGroup(java.lang.String group, java.lang.String priv)
          Adds a privilege to a privilege group.
 void create(java.lang.String name)
          Creates a privilege group.
 java.lang.String filter(java.lang.String findPattern)
          Finds privilege groups matching the specified filter pattern.
 boolean find(java.lang.String cID, java.lang.String name)
          Checks for a privilege group in a collection.
 int getCount(java.lang.String cID)
          Gets the size of a privilege group collection.
 java.lang.String getPrivilegesInGroup(java.lang.String group)
          Finds the privilegs in a privilege group.
 java.lang.String[] getReport(java.lang.String cID)
          Returns a report on a privilege group collection.
 java.lang.String[] getReport(java.lang.String cID, int iStart, int iCount)
          Returns a report on a subset of a privilege group collection.
 void release(java.lang.String cID)
          Release the privilege group collection.
 void remove(java.lang.String name)
          Removes a privilege group from the system.
 void removePrivilegeFromGroup(java.lang.String group, java.lang.String priv)
          Removes a privilege from a privilege group.
 void rename(java.lang.String oldName, java.lang.String newName)
          Renames a privilege group in the system.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

addPrivilegeToGroup

public void addPrivilegeToGroup(java.lang.String group,
                                java.lang.String priv)
                         throws com.wles.blm.BLMException
Adds a privilege to a privilege group.

Parameters:
group - privilege group name
priv - the privilege to add
Throws:
com.wles.blm.BLMException

create

public void create(java.lang.String name)
            throws com.wles.blm.BLMException
Creates a privilege group.

Specified by:
create in class BLMComponentManager
Parameters:
name - name of the Privilege group to be created
Throws:
BLMException

filter

public java.lang.String filter(java.lang.String findPattern)
                        throws com.wles.blm.BLMException
Finds privilege groups matching the specified filter pattern. Returns a privilege group collection ID.

Specified by:
filter in class BLMComponentManager
Parameters:
findPattern - pattern for the filter
Returns:
String id to the collection found
Throws:
com.wles.blm.BLMException
See Also:
getReport(String cID), getReport(String cID, int iStart, int iCount), getCount(String CID), release(String cID), find(String cID, String name)

find

public boolean find(java.lang.String cID,
                    java.lang.String name)
             throws com.wles.blm.BLMException
Checks for a privilege group in a collection.

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

getCount

public int getCount(java.lang.String cID)
             throws com.wles.blm.BLMException
Gets the size of a privilege group collection.

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

getPrivilegesInGroup

public java.lang.String getPrivilegesInGroup(java.lang.String group)
                                      throws com.wles.blm.BLMException
Finds the privilegs in a privilege group. Returns a privilege collection. Make use of the collection methods of the BLMPrivilegeManager class to access the collection.

Parameters:
group - privilege group name
Returns:
collection id of privileges in group
Throws:
com.wles.blm.BLMException
See Also:
BLMPrivilegeManager.getReport(String cID), BLMPrivilegeManager.getReport(String cID, int iStart, int iCount), BLMPrivilegeManager.getCount(String CID), BLMPrivilegeManager.release(String cID), BLMPrivilegeManager.find(String cID, String name)

getReport

public java.lang.String[] getReport(java.lang.String cID)
                             throws com.wles.blm.BLMException
Returns a report on a privilege group collection.

Parameters:
cID - ID of the collection
Returns:
A String array of privilege group names from the collection.
Throws:
BLMException

getReport

public java.lang.String[] getReport(java.lang.String cID,
                                    int iStart,
                                    int iCount)
                             throws com.wles.blm.BLMException
Returns a report on a subset of a privilege group collection.

Parameters:
cID - ID of the collection
iStart - starting index of the subset
iCount - size of the subset
Returns:
A String array of privilege group names from the collection.
Throws:
BLMException

release

public void release(java.lang.String cID)
             throws com.wles.blm.BLMException
Release the privilege group 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 com.wles.blm.BLMException
Removes a privilege group from the system.

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

removePrivilegeFromGroup

public void removePrivilegeFromGroup(java.lang.String group,
                                     java.lang.String priv)
                              throws com.wles.blm.BLMException
Removes a privilege from a privilege group.

Parameters:
group - privilege group name
priv - the privilege to remove
Throws:
com.wles.blm.BLMException

rename

public void rename(java.lang.String oldName,
                   java.lang.String newName)
            throws com.wles.blm.BLMException
Renames a privilege group in the system.

Specified by:
rename in class BLMComponentManager
Parameters:
oldName - old name of the Privilege to be renamed
newName - new name of the Privilege to be renamed
Throws:
BLMException


Copyright © 2005 BEA Systems Inc. All Rights Reserved.