| java.lang.Object com.sun.portal.desktop.admin.mbeans.tasks.DPHelper
DPHelper | public class DPHelper (Code) | | This class gets hold of the AdminDPContext object, and provide
methods to allow callers to get the dp document(s) and/or other
objects from the backend store.
The caller needs to provide a SSOToken in the constructor. This
class is called by PortalMBean where the amadmin user and password
is not directly available but a SSOToken is.
|
Method Summary | |
static void | appendBuffer(String a, StringBuffer b, int indent) | public static String | generateDPDocument(Document doc) Convert a dom document to string.
Parameters: doc - The dom document. | public static Object | getAdminDPContext(String portal) | public Set | getAllNames(int level) Gets all node name from the root node.
Parameters: level - The search level. | public Set | getAllNamesFromBase(String base, int level, boolean includeParent) Gets all node name for given base.
Parameters: base - The base dn. Parameters: level - The search level. Parameters: includeParent - True if the client also wants search allthe parent nodes. | public String | getDPDocument(String base) Gets the dp document as String.
Parameters: base - The base where the dp document is stored. | public static DPHelper | getDPHelper(PSConfigContext pcc, SSOToken ssoToken, String portal) Static method to get hold of the Java class. | public Document | getDocument(String base) Gets the dp document by given base.
Parameters: base - The base where the dp document is stored. | public Set | getDocumentNames(String base, int level) Gets all the document names associated with the given
base. | public Set | getDocumentNames(int level) Gets all the document names from the top most node. | public Map | getDocuments(Set nodes, int level) Gets all the documents associated with the given set of nodes. | public boolean | getServiceAttributes(String dn, Properties prop) Get service attribute value from the dp admin context, and store
the service attribute name and value pairs into the passed in
Properties object. | public boolean | isGlobal(String base) Check if the given base is the global key. | public void | removeDPDocument(String base) | public static void | setLogger(Logger logger) | public void | setServiceAttribute(String base, String key, String val, boolean isGlobal) Sets the attribute value. | public void | storeCombinedDPDocument(boolean isGlobal, String base, String dp) | public void | storeDPDocument(String base, String dp) | public void | storeGlobalDPDocument(String dp) Stores the global dp document. | static void | toStringBuffer(Node n, StringBuffer b, int indent) |
INDENT_SPACES | final static int INDENT_SPACES(Code) | | |
generateDPDocument | public static String generateDPDocument(Document doc)(Code) | | Convert a dom document to string.
Parameters: doc - The dom document. A String contains the dp document. |
getAllNamesFromBase | public Set getAllNamesFromBase(String base, int level, boolean includeParent)(Code) | | Gets all node name for given base.
Parameters: base - The base dn. Parameters: level - The search level. Parameters: includeParent - True if the client also wants search allthe parent nodes. A Set of node names.getAllNamesFromBase() See Also: com.sun.portal.desktop.context.AdminDPContext.getAllNamesFromBase |
getDPDocument | public String getDPDocument(String base)(Code) | | Gets the dp document as String.
Parameters: base - The base where the dp document is stored. Forexample, if the dp document is store in the LDAP, the base isthe dn of the LDAP node. The dp document based on the given location. |
getDPHelper | public static DPHelper getDPHelper(PSConfigContext pcc, SSOToken ssoToken, String portal) throws DesktopDataException(Code) | | Static method to get hold of the Java class.
Parameters: ssoToken - The SSOToken to allow execute onthe underling Identity API. Parameters: prop - The desktopconfig properties file name, which isrequired to get the DSAMEAdminDPContext object. Parameters: portal - the portal id. The DPHelper class object. |
getDocument | public Document getDocument(String base)(Code) | | Gets the dp document by given base.
Parameters: base - The base where the dp document is stored. Forexample, if the dp document is store in the LDAP, the base isthe dn of the LDAP node. The dp document based on the given location. |
getDocumentNames | public Set getDocumentNames(String base, int level)(Code) | | Gets all the document names associated with the given
base. This method performs the same function as the
getDocuments() method, except that it will
just get the list of the keys and returns a Set of
the document keys.
Parameters: base - The base target where the search begins. Forexample, if the dp document is stored in the LDAP, the base will be the dn of the LDAP node, and the search will be basedon this dn. Parameters: level - Specifies the scope of the search level. A Set of keys. |
getDocumentNames | public Set getDocumentNames(int level)(Code) | | Gets all the document names from the top most node. This method
performs the same function as the getDocuments() method,
except that it will just get the list of the keys and returns
a Set of the document keys.
Parameters: level - A Set of keys. |
getDocuments | public Map getDocuments(Set nodes, int level)(Code) | | Gets all the documents associated with the given set of nodes.
The documents list includes all the dp documents that
are the children of the given base.
Parameters: nodes - The set of nodes that the documents are associated with. Parameters: level - Specifies the scope of the search level. A Map of key, document pair. |
getServiceAttributes | public boolean getServiceAttributes(String dn, Properties prop) throws DesktopDataException(Code) | | Get service attribute value from the dp admin context, and store
the service attribute name and value pairs into the passed in
Properties object.
Parameters: dn - Node where the dp attributes are stored Parameters: prop - Properties object that will store the attributevalues boolean true if there is attribute foundin this node, false otherwise. |
isGlobal | public boolean isGlobal(String base)(Code) | | Check if the given base is the global key.
Parameters: base - The base true if the base is the global key; fase otherwise |
removeDPDocument | public void removeDPDocument(String base)(Code) | | |
setServiceAttribute | public void setServiceAttribute(String base, String key, String val, boolean isGlobal) throws DesktopDataException(Code) | | Sets the attribute value.
Parameters: dn - The distinguish name. Parameters: key - The attribute name. Parameters: val - The attribute value. |
|
|