com.wles.blm
Class BLMPrivilegeManager

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

public class BLMPrivilegeManager
extends BLMComponentManager

Manages operations on privileges. Privilege names are specified in the qualified form //priv/privName. Privileges represent actions which can be performed on resources. Subjects are granted the ability to perform these actions via rules using the BLMRuleManager. Use a BLMContextManager to obtain an instance of a BLMPrivilegeManager.

See Also:
BLMContextManager

Method Summary
 void create(java.lang.String name)
          Creates a new privilege.
 java.lang.String filter(java.lang.String findPattern)
          Finds all privileges matching the specified filter pattern.
 boolean find(java.lang.String cID, java.lang.String name)
          Checks for a privilege within a privilege collection.
 int getCount(java.lang.String cID)
          Returns the size of a privilege collection.
 java.lang.String[] getMemberOfPrivgrps(java.lang.String privName)
          Returns a list of privilege groups that this privilege belongs to.
 java.lang.String[] getReport(java.lang.String cID)
          Returns the report of a privilege collection.
 java.lang.String[] getReport(java.lang.String cID, int iStart, int iCount)
          Returns the report of a subset of a privilege collection.
 java.lang.String queryWithoutPrefix(java.lang.String findPattern)
           
 void release(java.lang.String cID)
          Release a privilege collection.
 void remove(java.lang.String name)
          Removes a privilege from the system.
 void rename(java.lang.String oldName, java.lang.String newName)
          Renames a privilege in the system.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

create

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

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

filter

public java.lang.String filter(java.lang.String findPattern)
                        throws com.wles.blm.BLMException
Finds all privileges matching the specified filter pattern. Returns a privilege 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 within a privilege collection.

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

getCount

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

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

getMemberOfPrivgrps

public java.lang.String[] getMemberOfPrivgrps(java.lang.String privName)
                                       throws com.wles.blm.BLMException
Returns a list of privilege groups that this privilege belongs to.

Parameters:
privName - Fully qualified name of the privilege.
Returns:
A String array of privilege group names.
Throws:
BLMException

getReport

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

Parameters:
cID - ID of the collection
Returns:
A String array of privilege 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 the report of a subset of a privilege collection.

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

queryWithoutPrefix

public java.lang.String queryWithoutPrefix(java.lang.String findPattern)
                                    throws com.wles.blm.BLMException
Throws:
com.wles.blm.BLMException

release

public void release(java.lang.String cID)
             throws com.wles.blm.BLMException
Release a privilege 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 from the system. The privilege must not be in use within any rules or the method will fail.

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

rename

public void rename(java.lang.String oldName,
                   java.lang.String newName)
            throws com.wles.blm.BLMException
Renames a privilege in the system. All rules and privilege groups referencing this privilege will automatically be updated.

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 © 2004-2008, Oracle and/or its affiliates. All rights reserved.