public class ReferenceStoreHelper
extends java.lang.Object
Constructor and Description |
---|
ReferenceStoreHelper() |
Modifier and Type | Method and Description |
---|---|
void |
addJarReferences(java.util.List<ReferenceListType> refList) |
void |
addReference(java.lang.String id,
javax.naming.Reference ref)
Add a new javax.naming.Reference to the reference store.
|
void |
destroy()
Release any resources being held by the ReferenceStoreHelper instance.
|
boolean |
exists(java.lang.String id)
Returns true if a Reference with the specified ID exists in the reference
store
|
javax.naming.Reference |
findReference(java.lang.String id)
Return the Reference for the specified ID.
|
ADFLogger |
getLogger() |
java.lang.Object |
getObjectForReference(java.lang.String id)
Get the Object identified by "id".
|
java.lang.Object |
getObjectForReference(java.lang.String id,
javax.naming.Reference reference) |
ReferenceListType |
getReferences()
Get the References object that is being maintained by this
ReferenceStoreHelper instance.
|
java.util.Map |
getReferencesMap()
Return a Map containing a javax.naming.Reference object for each
corresponding JAXB ReferenceType.
|
java.util.Map |
getReferencesMapEx(boolean includeExceptions)
Return a Map containing a javax.naming.Reference object for each
corresponding JAXB ReferenceType.
|
ReferenceListType |
getSaveableReferences() |
void |
init(ReferenceListType refs,
javax.naming.Context ctx,
java.util.Hashtable env)
Initialize the ReferenceStoreHelper.
|
void |
removeReference(java.lang.String id)
Remove a Reference from the reference store.
|
void |
saveCredentials()
Write the accummulated changes to the Credential Store.
|
public void init(ReferenceListType refs, javax.naming.Context ctx, java.util.Hashtable env)
refs
- JAXB ReferenceListType object that will be used to marshal/
unmarshal the Referencesctx
- Context this ReferenceStoreHelper is associated with.env
- Environment hashtable containing the security credentials that
should be used to access the Credential Storepublic ReferenceListType getReferences()
public ReferenceListType getSaveableReferences()
public ADFLogger getLogger()
public void addJarReferences(java.util.List<ReferenceListType> refList) throws java.lang.Exception
java.lang.Exception
public javax.naming.Reference findReference(java.lang.String id) throws javax.naming.NamingException
id
- ID of the JNDI Reference to be returnedjavax.naming.NamingException
- if an exception occurs locating the specified
JAXB ReferenceType or converting the JAXB ReferenceType into a
JNDI Referencepublic boolean exists(java.lang.String id) throws javax.naming.NamingException
id
- ID of the referencejavax.naming.NamingException
- if an exception occurs determining if the reference
exists or not.public java.lang.Object getObjectForReference(java.lang.String id) throws java.lang.Exception
id
- ID of the object to be returnedjava.lang.Exception
- if an exception occurs locating the Reference or
re-creating the object described by the Referencepublic java.lang.Object getObjectForReference(java.lang.String id, javax.naming.Reference reference) throws java.lang.Exception
java.lang.Exception
public java.util.Map getReferencesMapEx(boolean includeExceptions) throws javax.naming.NamingException
javax.naming.NamingException
- if an exception occurs populating the Map.public java.util.Map getReferencesMap() throws javax.naming.NamingException
javax.naming.NamingException
- if an exception occurs populating the Map.public void addReference(java.lang.String id, javax.naming.Reference ref) throws javax.naming.NamingException
id
- ID of the Referenceref
- the Reference to be addedjavax.naming.NamingException
- if an exception occurs adding the Referencepublic void removeReference(java.lang.String id) throws javax.naming.NamingException
id
- ID of the Reference to be removedjavax.naming.NamingException
- if an exception occurs removing the Referencepublic void saveCredentials() throws java.lang.Exception
java.lang.Exception
- if an exception occurs writing the accummulated changes
to the Credential Storepublic void destroy()