com.ca.commons.jndi.beans
Class JNDIBeanStore
java.lang.Object
com.ca.commons.jndi.beans.JNDIBeanStore
public final class JNDIBeanStore
- extends Object
|
Method Summary |
Collection<String> |
action(BeanStoreActionSpec spec)
|
NamingEnumeration<?> |
actionSearch(BeanStoreActionSpec spec)
|
void |
check()
|
void |
close()
|
boolean |
create(Object bean,
Collection<String> modifiedProperties)
|
boolean |
create(Object bean,
Collection<String> modifiedProperties,
int level)
|
boolean |
create(Object bean,
Collection<String> modifiedProperties,
int level,
String dn)
|
boolean |
create(Object bean,
Collection<String> modifiedProperties,
String dn)
|
boolean |
delete(Object bean)
|
boolean |
delete(Object bean,
String dn)
|
|
filterSearch(BeanStoreSearchSpec<E> searchSpec)
|
NamingEnumeration<?> |
filterSearchNames(BeanStoreSearchSpec<?> searchSpec)
|
DirContextFactory |
getDirContextFactory()
|
String |
getDN(BeanStoreClassSpec<?> cl,
String rdn)
|
String |
getDN(BeanStoreClassSpec<?> cl,
String rdn,
String baseDN)
|
String |
getDN(BeanStoreClassSpec<?> cl,
String rdn,
String[] args)
|
String |
getDN(BeanStoreClassSpec<?> cl,
String rdn,
String[] args,
String baseDN)
|
String |
getDN(Class<?> cl,
String rdn)
|
String |
getDN(Class<?> cl,
String rdn,
String baseDN)
|
String |
getDN(Class<?> cl,
String rdn,
String[] args,
String baseDN)
|
JNDIBeanStoreFactory |
getFactory()
|
String |
getProperty(String key)
|
boolean |
isClosed()
|
Collection<String> |
load(Object bean,
int level,
int previousLoadLevel,
Collection<String> excludeProps,
Collection<String> propertiesToLoad)
|
boolean |
objectExists(String dn)
|
com.ca.commons.util.LazyIterable<String> |
propertiesToLoad(BeanStoreClassSpec<?> clSpec,
int previousLevel,
int level)
|
void |
rename(String oldName,
String newName)
|
boolean |
save(Object bean,
Collection<String> modifiedProperties,
String dn,
Map<String,? extends Collection<?>> origCollectionValues)
|
boolean |
save(Object bean,
Collection<String> modifiedProperties,
String dn,
Map<String,? extends Collection<?>> origCollectionValues,
boolean isSyncAccountsSave)
|
boolean |
save(Object bean,
Collection<String> propertiesToSave,
String dn,
Map<String,? extends Collection<?>> origCollectionValues,
int level,
boolean isSyncAccountsSave)
Saves specified properties of a bean. |
void |
setDirContextFactory(DirContextFactory ctxFactory)
|
void |
setProperties(Properties props)
|
void |
setProperty(String key,
String value)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
logger
public static final Logger logger
operationsLogger
public static final Logger operationsLogger
ALWAYS_READ_STRING
public static final String ALWAYS_READ_STRING
- See Also:
- Constant Field Values
ALWAYS_SKIP_READ_STRING
public static final String ALWAYS_SKIP_READ_STRING
- See Also:
- Constant Field Values
PROPNAME_JNDISUBTYPE
public static final String PROPNAME_JNDISUBTYPE
- See Also:
- Constant Field Values
LEVEL_NONE
public static final int LEVEL_NONE
- See Also:
- Constant Field Values
LEVEL_EXISTS
public static final int LEVEL_EXISTS
- See Also:
- Constant Field Values
LEVEL_COMMON
public static final int LEVEL_COMMON
- See Also:
- Constant Field Values
LEVEL_STANDARD
public static final int LEVEL_STANDARD
- See Also:
- Constant Field Values
LEVEL_UNCOMMON
public static final int LEVEL_UNCOMMON
- See Also:
- Constant Field Values
LEVEL_ALL
public static final int LEVEL_ALL
- See Also:
- Constant Field Values
setDirContextFactory
public void setDirContextFactory(@NotNull
DirContextFactory ctxFactory)
check
public final void check()
throws NamingException
- Throws:
NamingException
close
public final void close()
throws NamingException
- Throws:
NamingException
isClosed
public final boolean isClosed()
getFactory
public final JNDIBeanStoreFactory getFactory()
getDirContextFactory
public final DirContextFactory getDirContextFactory()
setProperties
public final void setProperties(Properties props)
setProperty
public final void setProperty(String key,
String value)
getProperty
public final String getProperty(String key)
getDN
public String getDN(Class<?> cl,
String rdn)
throws JNDIBeanStoreException
- Throws:
JNDIBeanStoreException
getDN
public String getDN(BeanStoreClassSpec<?> cl,
String rdn)
throws JNDIBeanStoreException
- Throws:
JNDIBeanStoreException
getDN
public String getDN(Class<?> cl,
String rdn,
String baseDN)
throws JNDIBeanStoreException
- Throws:
JNDIBeanStoreException
getDN
public String getDN(BeanStoreClassSpec<?> cl,
String rdn,
String baseDN)
throws JNDIBeanStoreException
- Throws:
JNDIBeanStoreException
getDN
public String getDN(BeanStoreClassSpec<?> cl,
String rdn,
String[] args)
throws JNDIBeanStoreException
- Throws:
JNDIBeanStoreException
getDN
public String getDN(Class<?> cl,
String rdn,
String[] args,
String baseDN)
throws JNDIBeanStoreException
- Throws:
JNDIBeanStoreException
getDN
public String getDN(BeanStoreClassSpec<?> cl,
String rdn,
String[] args,
String baseDN)
throws JNDIBeanStoreException
- Throws:
JNDIBeanStoreException
objectExists
public final boolean objectExists(String dn)
throws NamingException
- Throws:
NamingException
filterSearch
public <E> NamingEnumeration<E> filterSearch(BeanStoreSearchSpec<E> searchSpec)
throws NamingException
- Throws:
NamingException
filterSearchNames
public NamingEnumeration<?> filterSearchNames(BeanStoreSearchSpec<?> searchSpec)
throws NamingException
- Throws:
NamingException
actionSearch
public final NamingEnumeration<?> actionSearch(BeanStoreActionSpec spec)
throws NamingException
- Throws:
NamingException
action
public final Collection<String> action(BeanStoreActionSpec spec)
throws NamingException
- Throws:
NamingException
rename
public final void rename(String oldName,
String newName)
throws NamingException
- Throws:
NamingException
save
public final boolean save(Object bean,
Collection<String> modifiedProperties,
String dn,
Map<String,? extends Collection<?>> origCollectionValues)
throws NamingException
- Throws:
NamingException
save
public final boolean save(Object bean,
Collection<String> modifiedProperties,
String dn,
Map<String,? extends Collection<?>> origCollectionValues,
boolean isSyncAccountsSave)
throws NamingException
- Throws:
NamingException
save
public final boolean save(Object bean,
Collection<String> propertiesToSave,
String dn,
@Nullable
Map<String,? extends Collection<?>> origCollectionValues,
int level,
boolean isSyncAccountsSave)
throws NamingException
- Saves specified properties of a bean.
- Parameters:
bean - The bean to save.propertiesToSave - The names of properties of the bean that
should be saved. Cannot be null.dn - The name that will be the recipient of the JNDI modify operation.
This can be null, in which case it will be deduced from the mapping information.origCollectionValues - Optional map of original values of
multivalued properties. If this is present, modification will be done
via add/remove of changed values instead of replacing all values.level - Properties with a load level above this will not be saved.
This is usually set to LEVEL_ALL. @return Always True.
- Throws:
NamingException
propertiesToLoad
public com.ca.commons.util.LazyIterable<String> propertiesToLoad(BeanStoreClassSpec<?> clSpec,
int previousLevel,
int level)
load
public final Collection<String> load(Object bean,
int level,
int previousLoadLevel,
Collection<String> excludeProps,
@Nullable
Collection<String> propertiesToLoad)
throws NamingException
- Throws:
NamingException
create
public final boolean create(Object bean,
Collection<String> modifiedProperties)
throws NamingException
- Throws:
NamingException
create
public final boolean create(Object bean,
Collection<String> modifiedProperties,
int level)
throws NamingException
- Throws:
NamingException
create
public final boolean create(Object bean,
Collection<String> modifiedProperties,
String dn)
throws NamingException
- Throws:
NamingException
create
public final boolean create(Object bean,
Collection<String> modifiedProperties,
int level,
String dn)
throws NamingException
- Throws:
NamingException
delete
public final boolean delete(Object bean)
throws NamingException
- Throws:
NamingException
delete
public final boolean delete(Object bean,
String dn)
throws NamingException
- Throws:
NamingException
Created 2011-07-14 13:27 EST