|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.norther.tammi.core.base.Adaptee org.norther.tammi.root.db.DefaultRepositoryClient org.norther.tammi.root.db.DefaultMultiRepositoryClient org.norther.tammi.root.db.DefaultBeanRepositoryClient
public class DefaultBeanRepositoryClient
A default implementation of BeanRepositoryClient.
Field Summary |
---|
Fields inherited from class org.norther.tammi.root.db.DefaultRepositoryClient |
---|
AUTHENTICATED_SIGNATURE, DEFAULT_PERSISTER, KEY_SIGNATURE |
Fields inherited from class org.norther.tammi.core.base.Adaptee |
---|
ADAPTEE_NOTIF_DESCRIPTION, ADAPTEE_NOTIFICATIONS |
Fields inherited from interface org.norther.tammi.root.db.BeanRepositoryClient |
---|
CLASS_NAME_ATTRIBUTE, GROUP_NAME_ATTRIBUTE, HIGH_ATTRIBUTE_PREFIX, IDENTITY_ATTRIBUTE, LOW_ATTRIBUTE_PREFIX, ORDER_BY_ATTRIBUTE, QUERY_LIMIT_ATTRIBUTE, QUERY_OFFSET_ATTRIBUTE, USERNAME_ATTRIBUTE |
Constructor Summary | |
---|---|
DefaultBeanRepositoryClient()
Constructs a new repository client. |
Method Summary | ||
---|---|---|
boolean |
add1NForeignReferences(Object node,
String className,
String fkField,
Object[] fks,
Persister persister)
Adds foreign references to 1:n relations in a tree. |
|
boolean |
add1NNullReferences(String className,
String fkField,
Object[] fks,
Persister persister)
Adds null references to 1:n relations in a tree. |
|
boolean |
add1NObjectReferences(Object node,
String relField,
String fkField,
Object[] fks,
Persister persister)
Adds object references to 1:n relations in a tree formed by nodes of the same class. |
|
boolean |
addAttributeValues(Object node,
String field,
Persister persister,
List<Object> result)
Adds nested attribute values in a tree to a list. |
|
boolean |
addTo1NRelationMap(Object node,
String fkField,
DBCriteria<?> criteria,
Persister persister,
ConcurrentMap<Object,Object> map)
Adds referenced objects fulfilling the specified criteria in a 1:n tree to a map. |
|
boolean |
addTo1NRelationMap(Object node,
String relField,
String fkField,
DBCriteria<?> criteria,
Persister persister,
ConcurrentMap<Object,Object> map)
Adds referenced objects fulfilling the specified criteria in a 1:n tree to a map. |
|
boolean |
addToAttributeChain(Object node,
String relField,
String valueField,
Persister persister,
List<Object> list)
Adds attribute values of a chain of referenced objects in a tree into a list, the attribute of the end object at the lowest index. |
|
boolean |
addToAttributeMap(Object node,
String relField,
String valueField,
Persister persister,
ConcurrentMap<Object,Object> map)
Adds attribute values of referenced nodes in a tree into a map. |
|
boolean |
addToIdentityList(Collection<? extends Variable> vars,
int index,
String[] nameFields,
Persister persister,
OrderedSet<? super EnumeratedIdentity> list)
Adds a collection of variables as enumerated identities to an ordered set. |
|
boolean |
addToIdentityList(Variable var,
int index,
String[] nameFields,
Persister persister,
OrderedSet<? super EnumeratedIdentity> list)
Adds the specified variable as an enumerated identity to an ordered set. |
|
boolean |
addToIdentityTree(Collection<? extends Variable> roots,
String childField,
String[] nameFields,
Persister persister,
OrderedMap<Identity,EnumeratedIdentity> tree)
Adds a collection of root variables to an ordered map. |
|
boolean |
addToIdentityTree(Collection<? extends Variable> vars,
String parentField,
String childField,
String[] nameFields,
Persister persister,
OrderedMap<Identity,EnumeratedIdentity> tree)
Adds the variable chains of the selected variables to an ordered map. |
|
boolean |
addToIdentityTree(Identity[] ids,
String parentField,
String childField,
String[] nameFields,
Persister persister,
OrderedMap<Identity,EnumeratedIdentity> tree)
Adds the variable chains of the selected identities to an ordered map. |
|
boolean |
addToIdentityTree(Identity id,
String parentField,
String childField,
String[] nameFields,
Persister persister,
OrderedMap<Identity,EnumeratedIdentity> tree)
Adds the variable chain of the selected identity to an ordered map. |
|
boolean |
addToIdentityTree(Variable root,
String childField,
String[] nameFields,
Persister persister,
OrderedMap<Identity,EnumeratedIdentity> tree)
Adds the specified root variable to an ordered map. |
|
boolean |
addToIdentityTree(Variable var,
String parentField,
String childField,
String[] nameFields,
Persister persister,
OrderedMap<Identity,EnumeratedIdentity> tree)
Adds the variable chain of the selected variable to an ordered map. |
|
boolean |
addToMNRelationMap(Object node,
String indirection,
String fkField1,
String fkField2,
DBCriteria<?> criteria,
Persister persister,
ConcurrentMap<Object,Object> map)
Adds referenced objects fulfilling the specified criteria in a m:n tree to a map. |
|
boolean |
addToMNRelationMap(Object node,
String relField,
String indirection,
String fkField1,
String fkField2,
DBCriteria<?> criteria,
Persister persister,
ConcurrentMap<Object,Object> map)
Adds referenced objects fulfilling the specified criteria in a m:n tree to a map. |
|
boolean |
addToRelationChain(Object node,
String relField,
Persister persister,
List<Object> list)
Adds a chain of referenced objects in a tree to a list, the end node at the lowest index. |
|
boolean |
addToRelationMap(Object node,
String relField,
Persister persister,
ConcurrentMap<Object,Object> map)
Adds referenced objects in a tree to a map. |
|
boolean |
addToVariableChain(Variable var,
String relField,
Collection<? extends Identity> filter,
Persister persister,
List<? super Variable> list)
Adds a chain of referenced variables in a tree to a list, the end variable at the lowest index. |
|
boolean |
addToVariableChain(Variable var,
String relField,
Persister persister,
List<? super Variable> list)
Adds a chain of referenced variables in a tree to a list, the end variable at the lowest index. |
|
void |
buildSearchVariable(Variable var,
String className,
Persister persister)
Builds a search variable with attributes for searching instances of the specified target variable class. |
|
boolean |
checkMetaElement(Variable element,
Permission permission,
Persister persister)
Checks a meta element with the specified permissions. |
|
void |
collapseInIdentityTree(Identity id,
Persister persister,
OrderedMap<Identity,EnumeratedIdentity> tree)
Collapses the specified identity in the ordered map representing an identity tree. |
|
Introspector |
createIntrospector()
Creates a variable introspector. |
|
Variable |
createMetaDesktop(String name,
Object uid,
Object gid,
Persister persister)
Creates a default desktop. |
|
Variable |
createMetaElement(Variable namespace,
String type,
String name)
Creates a new meta element instance of the specified type and in the specified namespace. |
|
Variable |
createMetaFolder(String name,
Object uid,
Object gid,
Persister persister)
Creates a default folder. |
|
protected DBCriteria<Variable> |
createPermissionCriteria(String className,
Object oid,
Object uid,
Object[] gids,
boolean others,
boolean recordp,
Permission permission,
Persister persister)
Creates the specified meta permission criteria for a query. |
|
DBCriteria<Variable> |
createPermissionCriteria(String className,
Object oid,
Object uid,
Object[] gids,
boolean others,
Permission permission,
Persister persister)
Creates the specified permission criteria for a meta element query. |
|
DBCriteria<? extends Variable> |
createUserPermissionCriteria(String className,
Permission permission,
Persister persister)
Creates the specified user permission criteria for a meta element query. |
|
|
createVariable(Class<T> clazz)
Creates a new variable instance of the specified class. |
|
Variable |
createVariable(String type)
Creates a new variable instance of the specified type. |
|
void |
expandInIdentityTree(Identity id,
String childField,
String[] nameFields,
Persister persister,
OrderedMap<Identity,EnumeratedIdentity> tree)
Expands the specified identity in the ordered map representing an identity tree. |
|
DBQuery<? extends Variable> |
fillQueryCriteria(Variable search,
DBCriteria<? extends Variable> criteria,
Persister persister)
Fills query criteria for searching instances defined by the specified search variable. |
|
VariableAttributeInfo |
getAttributeInfo(Variable node,
String field,
Persister persister)
Gets a nested attribute info in a tree. |
|
List<Object> |
getAttributeValues(Object node,
String field,
Persister persister)
Gets a list of nested attribute values in a tree. |
|
Variable |
getMetaDesktop(Persister persister)
Gets a default desktop. |
|
Variable |
getMetaFolder(Persister persister)
Gets a default folder. |
|
int |
getReferenceDepth(Object node,
String relField,
Persister persister)
Gets the depth of a node in a tree. |
|
Object |
getReferenceValue(Object node,
int index,
String relField,
Persister persister)
Gets the indexed node in a tree. |
|
protected ResourceMap |
getResourceMap()
Gets the resource map. |
|
ObjectName |
getResourceMapName()
Gets the bean resource map. |
|
Variable |
getRootFolder(Persister persister)
Gets the root folder. |
|
List<Object> |
getRootReferences(Object node,
String relField,
Persister persister)
Gets a list of root nodes in a tree. |
|
VariableInfo |
getVariableInfo(String type)
Gets the variable info of the specified type. |
|
protected VariableRegistry |
getVariableRegistry()
Gets the variable registry. |
|
ObjectName |
getVariableRegistryName()
Gets the the variable registry to be applied by contexts of this filter. |
|
boolean |
isLocalizedBeans()
Gets the localized beans flag. |
|
boolean |
isRelatedTo(Object node,
String relField,
Object xpk,
Persister persister)
Checks whether the specified key is related to the specified node. |
|
int[] |
orderObjects(Collection<?> objects,
String[] sortFields,
Persister persister)
Orders a collection of objects with the specified fields. |
|
void |
postmanaged()
This method is called when the implementing adaptee has been managed either during post-registration of the corresponding adapter MBean or just after it is explicitly added to the adapter MBean during run-time. |
|
|
queryAllMemberGroups(String className,
String[] sortFields,
Persister persister)
Queries all member groups of the current user in a relation tree fulfilling the specified criteria, and may sort them by optional sort fields. |
|
|
queryAllObjects(DBCriteria<T> criteria,
String[] sortFields,
Persister persister,
Object... clazz)
Queries all objects fulfilling the specified criteria and may sort them by optional sort fields. |
|
|
queryAllObjects(DBQuery<T> query,
String[] sortFields,
Persister persister)
Queries all objects of the specified query and may sort them by optional sort fields. |
|
|
queryChildMemberGroups(String className,
String[] sortFields,
Persister persister)
Queries child member groups of the current user in a relation tree fulfilling the specified criteria, and may sort them by optional sort fields. |
|
Variable |
queryMetaElement(Identity id,
Permission permission,
Persister persister)
Queries a meta element with the specified permissions. |
|
|
queryParentMemberGroups(String className,
String[] sortFields,
Persister persister)
Queries parent member groups of the current user in a relation tree fulfilling the specified criteria, and may sort them by optional sort fields. |
|
|
queryTreeObjects(DBCriteria<T> criteria,
String relField,
Object rpk,
int depth,
String[] sortFields,
Persister persister,
Object... clazz)
Queries objects to the specified depth in a relation tree fulfilling the specified criteria and may sort them by optional sort fields. |
|
boolean |
restoreIdentityTree(List<? extends EnumeratedAttribute> enums,
int depth,
String parentField,
String childField,
String[] nameFields,
Persister persister,
OrderedMap<Identity,EnumeratedIdentity> tree)
Restores the specified enumerated identities to an ordered map. |
|
void |
setLocalizedBeans(boolean flag)
Sets the localized beans flag. |
|
Object[] |
setMNForeignReferences(Object node,
String indirection,
String fkField1,
String fkField2,
Object[] fks,
Persister persister)
Sets foreign references in m:n relations in a tree. |
|
Object[] |
setMNObjectReferences(Object node,
String relField,
String indirection,
String fkField1,
String fkField2,
Object[] fks,
Persister persister)
Sets object references in m:n relations in a tree formed by nodes of the same class. |
|
void |
setResourceMapName(ObjectName map)
Sets the bean resource map. |
|
void |
setVariableRegistryName(ObjectName registry)
Sets the variable registry to be applied by contexts this filter. |
|
|
sortObjects(Collection<T> objects,
String[] sortFields,
Persister persister)
Sorts a collection of objects with the specified fields. |
|
void |
unmanaged()
This method is called when the implementing adaptee is unmanaged either during pre-deregistration of the corresponding adapter MBean or just before it is explicitly removed from the adapter MBean during run-time. |
Methods inherited from class org.norther.tammi.core.base.Adaptee |
---|
addAdaptee, addNotificationListener, getAttributeSupport, getBroker, getCanonicalName, getDomain, getFactory, getLoader, getLog, getLog, getMBean, getMBeanServer, getNotificationInfo, getObjectName, getRegistrationTime, getSequenceNumber, hasListeners, isRegistered, premanaged, removeNotificationListener, removeNotificationListener, sendNotification, sendNotification, sendNotification, sendNotification, unregister |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DefaultBeanRepositoryClient()
Method Detail |
---|
public void postmanaged()
Manageable
postmanaged
in interface Manageable
postmanaged
in class Adaptee
public void unmanaged() throws Exception
Manageable
unmanaged
in interface Manageable
unmanaged
in class Adaptee
Exception
- if the adaptee refused to be unmanaged.public Introspector createIntrospector()
BeanRepositoryClient
createIntrospector
in interface BeanRepositoryClient
public ObjectName getResourceMapName()
BeanRepositoryClient
getResourceMapName
in interface BeanRepositoryClient
public void setResourceMapName(ObjectName map)
BeanRepositoryClient
setResourceMapName
in interface BeanRepositoryClient
map
- the name of the map or a query.public boolean isLocalizedBeans()
BeanRepositoryClient
isLocalizedBeans
in interface BeanRepositoryClient
public void setLocalizedBeans(boolean flag)
BeanRepositoryClient
setLocalizedBeans
in interface BeanRepositoryClient
flag
- the localized beans flag.public ObjectName getVariableRegistryName()
BeanRepositoryClient
getVariableRegistryName
in interface BeanRepositoryClient
public void setVariableRegistryName(ObjectName registry)
BeanRepositoryClient
setVariableRegistryName
in interface BeanRepositoryClient
registry
- the object name of the variable registry or a query.public <T extends Variable> T createVariable(Class<T> clazz) throws ConstructionException
BeanRepositoryClient
createVariable
in interface BeanRepositoryClient
T
- the variable type.clazz
- the class of the variable.
ConstructionException
- if construction fails.public Variable createVariable(String type) throws ConstructionException
BeanRepositoryClient
createVariable
in interface BeanRepositoryClient
type
- the type of the variable.
ConstructionException
- if construction fails.public Variable createMetaElement(Variable namespace, String type, String name) throws AttributeNotFoundException, InvalidAttributeValueException, ConstructionException
BeanRepositoryClient
createMetaElement
in interface BeanRepositoryClient
namespace
- the namespace of the element.type
- the type of the element.name
- the name of the element.
AttributeNotFoundException
- for a missing field.
InvalidAttributeValueException
- if the value is invalid.
ConstructionException
- if construction fails.public VariableInfo getVariableInfo(String type)
BeanRepositoryClient
getVariableInfo
in interface BeanRepositoryClient
type
- the type of the variable.
public VariableAttributeInfo getAttributeInfo(Variable node, String field, Persister persister) throws AttributeNotFoundException
BeanRepositoryClient
getAttributeInfo
in interface BeanRepositoryClient
node
- the node variable.field
- the attribute field(s).persister
- the persister.
AttributeNotFoundException
- for a missing field.public List<Object> getAttributeValues(Object node, String field, Persister persister) throws AttributeNotFoundException
BeanRepositoryClient
getAttributeValues
in interface BeanRepositoryClient
node
- the node object.field
- the attribute field(s).persister
- the persister.
AttributeNotFoundException
- for a missing field.public boolean addAttributeValues(Object node, String field, Persister persister, List<Object> result) throws AttributeNotFoundException
BeanRepositoryClient
addAttributeValues
in interface BeanRepositoryClient
node
- the node object.field
- the attribute field(s).persister
- the persister.result
- a list of attribute values.
AttributeNotFoundException
- for a missing field.public int getReferenceDepth(Object node, String relField, Persister persister) throws AttributeNotFoundException
BeanRepositoryClient
getReferenceDepth
in interface BeanRepositoryClient
node
- the node object.relField
- the relation field.persister
- the persister.
AttributeNotFoundException
- for a missing field.public List<Object> getRootReferences(Object node, String relField, Persister persister) throws AttributeNotFoundException
BeanRepositoryClient
getRootReferences
in interface BeanRepositoryClient
node
- the node object.relField
- the relation field.persister
- the persister.
AttributeNotFoundException
- for a missing field.public Object getReferenceValue(Object node, int index, String relField, Persister persister) throws AttributeNotFoundException
BeanRepositoryClient
Note that a negative index is calculated from the bottom of the reference chain.
getReferenceValue
in interface BeanRepositoryClient
node
- the node object.index
- the node index.relField
- the relation field.persister
- the persister.
AttributeNotFoundException
- for a missing field.public boolean isRelatedTo(Object node, String relField, Object xpk, Persister persister) throws AttributeNotFoundException
BeanRepositoryClient
isRelatedTo
in interface BeanRepositoryClient
node
- the node object.relField
- the relation field.xpk
- the primary key to check.persister
- the persister.
AttributeNotFoundException
- for a missing field.public boolean addToRelationChain(Object node, String relField, Persister persister, List<Object> list) throws AttributeNotFoundException, PersistenceException
BeanRepositoryClient
addToRelationChain
in interface BeanRepositoryClient
node
- the node object.relField
- the relation field.persister
- the persister.list
- the result list.
AttributeNotFoundException
- for a missing field.
PersistenceException
- if a persister operation fails.public boolean addToRelationMap(Object node, String relField, Persister persister, ConcurrentMap<Object,Object> map) throws AttributeNotFoundException, PersistenceException
BeanRepositoryClient
addToRelationMap
in interface BeanRepositoryClient
node
- the node object.relField
- the relation field.persister
- the persister.map
- the result map.
AttributeNotFoundException
- for a missing field.
PersistenceException
- if a persister operation fails.public boolean addTo1NRelationMap(Object node, String fkField, DBCriteria<?> criteria, Persister persister, ConcurrentMap<Object,Object> map) throws AttributeNotFoundException, PersistenceException
BeanRepositoryClient
addTo1NRelationMap
in interface BeanRepositoryClient
node
- the node object.fkField
- the foreign key field.criteria
- the selection criteria.persister
- the persister.map
- the result map.
AttributeNotFoundException
- for a missing field.
PersistenceException
- if a persister operation fails.public boolean addTo1NRelationMap(Object node, String relField, String fkField, DBCriteria<?> criteria, Persister persister, ConcurrentMap<Object,Object> map) throws AttributeNotFoundException, PersistenceException
BeanRepositoryClient
addTo1NRelationMap
in interface BeanRepositoryClient
node
- the node object.relField
- the relation field.fkField
- the foreign key field.criteria
- the selection criteria.persister
- the persister.map
- the result map.
AttributeNotFoundException
- for a missing field.
PersistenceException
- if a persister operation fails.public boolean addToMNRelationMap(Object node, String indirection, String fkField1, String fkField2, DBCriteria<?> criteria, Persister persister, ConcurrentMap<Object,Object> map) throws AttributeNotFoundException, PersistenceException
BeanRepositoryClient
addToMNRelationMap
in interface BeanRepositoryClient
node
- the node object.indirection
- the indirection class name.fkField1
- the foreign key field to the node.fkField2
- the foreign key field to the reference.criteria
- the selection criteria.persister
- the persister.map
- the result map.
AttributeNotFoundException
- for a missing field.
PersistenceException
- if a persister operation fails.public boolean addToMNRelationMap(Object node, String relField, String indirection, String fkField1, String fkField2, DBCriteria<?> criteria, Persister persister, ConcurrentMap<Object,Object> map) throws AttributeNotFoundException, PersistenceException
BeanRepositoryClient
addToMNRelationMap
in interface BeanRepositoryClient
node
- the node object.relField
- the relation field.indirection
- the indirection class name.fkField1
- the foreign key field to the node.fkField2
- the foreign key field to the reference.criteria
- the selection criteria.persister
- the persister.map
- the result map.
AttributeNotFoundException
- for a missing field.
PersistenceException
- if a persister operation fails.public boolean addToAttributeChain(Object node, String relField, String valueField, Persister persister, List<Object> list) throws AttributeNotFoundException, PersistenceException
BeanRepositoryClient
addToAttributeChain
in interface BeanRepositoryClient
node
- the node object.relField
- the relation field.valueField
- the value field.persister
- the persister.list
- the result list.
AttributeNotFoundException
- for a missing field.
PersistenceException
- if a persister operation fails.public boolean addToAttributeMap(Object node, String relField, String valueField, Persister persister, ConcurrentMap<Object,Object> map) throws AttributeNotFoundException, PersistenceException
BeanRepositoryClient
addToAttributeMap
in interface BeanRepositoryClient
node
- the node object.relField
- the relation field.valueField
- the value field.persister
- the persister.map
- the result map.
AttributeNotFoundException
- for a missing field.
PersistenceException
- if a persister operation fails.public boolean add1NNullReferences(String className, String fkField, Object[] fks, Persister persister) throws AttributeNotFoundException, InvalidAttributeValueException, PersistenceException
BeanRepositoryClient
add1NNullReferences
in interface BeanRepositoryClient
className
- the data class name.fkField
- the foreign key field.fks
- an array of new foreign keys or identities.persister
- the persister.
AttributeNotFoundException
- for a missing field.
InvalidAttributeValueException
- if the value is invalid.
PersistenceException
- if a persister operation fails.public boolean add1NForeignReferences(Object node, String className, String fkField, Object[] fks, Persister persister) throws AttributeNotFoundException, InvalidAttributeValueException, PersistenceException
BeanRepositoryClient
add1NForeignReferences
in interface BeanRepositoryClient
node
- the node object.className
- the data class name.fkField
- the foreign key field.fks
- an array of new foreign keys or identities.persister
- the persister.
AttributeNotFoundException
- for a missing field.
InvalidAttributeValueException
- if the value is invalid.
PersistenceException
- if a persister operation fails.public boolean add1NObjectReferences(Object node, String relField, String fkField, Object[] fks, Persister persister) throws AttributeNotFoundException, InvalidAttributeValueException, PersistenceException
BeanRepositoryClient
add1NObjectReferences
in interface BeanRepositoryClient
node
- the node object.relField
- the relation field.fkField
- the foreign key field.fks
- an array of new foreign keys or identities.persister
- the persister.
AttributeNotFoundException
- for a missing field.
InvalidAttributeValueException
- if the value is invalid.
PersistenceException
- if a persister operation fails.public Object[] setMNForeignReferences(Object node, String indirection, String fkField1, String fkField2, Object[] fks, Persister persister) throws AttributeNotFoundException, InvalidAttributeValueException, ConstructionException, PersistenceException
BeanRepositoryClient
setMNForeignReferences
in interface BeanRepositoryClient
node
- the node object.indirection
- the indirection class name.fkField1
- the foreign key field to the node.fkField2
- the foreign key field to the reference.fks
- an array of new foreign keys or identities.persister
- the persister.
AttributeNotFoundException
- for a missing field.
InvalidAttributeValueException
- if the value is invalid.
ConstructionException
- if object construction fails.
PersistenceException
- if a persister operation fails.public Object[] setMNObjectReferences(Object node, String relField, String indirection, String fkField1, String fkField2, Object[] fks, Persister persister) throws AttributeNotFoundException, InvalidAttributeValueException, ConstructionException, PersistenceException
BeanRepositoryClient
setMNObjectReferences
in interface BeanRepositoryClient
node
- the node object.relField
- the relation field.indirection
- the indirection class name.fkField1
- the foreign key field to the node.fkField2
- the foreign key field to the reference.fks
- an array of new foreign keys or identities.persister
- the persister.
AttributeNotFoundException
- if the name is unknown.
InvalidAttributeValueException
- if the value is invalid.
ConstructionException
- if object construction fails.
PersistenceException
- if a persister operation fails.public int[] orderObjects(Collection<?> objects, String[] sortFields, Persister persister)
BeanRepositoryClient
orderObjects
in interface BeanRepositoryClient
objects
- a collection of objects.sortFields
- the sort fields.persister
- the persister.
public <T> Collection<T> sortObjects(Collection<T> objects, String[] sortFields, Persister persister)
BeanRepositoryClient
sortObjects
in interface BeanRepositoryClient
T
- the object type.objects
- a collection of objects.sortFields
- optional sort fields.persister
- the persister.
public boolean addToVariableChain(Variable var, String relField, Persister persister, List<? super Variable> list) throws AttributeNotFoundException, PersistenceException
BeanRepositoryClient
addToVariableChain
in interface BeanRepositoryClient
var
- the node variable.relField
- the relation field.persister
- the persister.list
- the result list.
AttributeNotFoundException
- for a missing field.
PersistenceException
- if a persister operation fails.public boolean addToVariableChain(Variable var, String relField, Collection<? extends Identity> filter, Persister persister, List<? super Variable> list) throws AttributeNotFoundException, PersistenceException
BeanRepositoryClient
addToVariableChain
in interface BeanRepositoryClient
var
- the node variable.relField
- the relation field.filter
- the identity filter.persister
- the persister.list
- the result list.
AttributeNotFoundException
- for a missing field.
PersistenceException
- if a persister operation fails.public boolean addToIdentityList(Variable var, int index, String[] nameFields, Persister persister, OrderedSet<? super EnumeratedIdentity> list) throws AttributeNotFoundException, PersistenceException
BeanRepositoryClient
addToIdentityList
in interface BeanRepositoryClient
var
- the variable.index
- the index (-1 = append).nameFields
- optional name fields.persister
- the persister.list
- the selection list.
AttributeNotFoundException
- for a missing field.
PersistenceException
- if a persister operation fails.public boolean addToIdentityList(Collection<? extends Variable> vars, int index, String[] nameFields, Persister persister, OrderedSet<? super EnumeratedIdentity> list) throws AttributeNotFoundException, PersistenceException
BeanRepositoryClient
addToIdentityList
in interface BeanRepositoryClient
vars
- a collection of variables.index
- the index (-1 = append).nameFields
- optional name fields.persister
- the persister.list
- the selection list.
AttributeNotFoundException
- for a missing field.
PersistenceException
- if a persister operation fails.public boolean addToIdentityTree(Variable root, String childField, String[] nameFields, Persister persister, OrderedMap<Identity,EnumeratedIdentity> tree) throws AttributeNotFoundException, PersistenceException
BeanRepositoryClient
addToIdentityTree
in interface BeanRepositoryClient
root
- the root variable.childField
- the child field.nameFields
- optional name fields.persister
- the persister.tree
- the selection tree.
AttributeNotFoundException
- for a missing field.
PersistenceException
- if a persister operation fails.public boolean addToIdentityTree(Collection<? extends Variable> roots, String childField, String[] nameFields, Persister persister, OrderedMap<Identity,EnumeratedIdentity> tree) throws AttributeNotFoundException, PersistenceException
BeanRepositoryClient
addToIdentityTree
in interface BeanRepositoryClient
roots
- a collection of root variables.childField
- the child field.nameFields
- optional name fields.persister
- the persister.tree
- the selection tree.
AttributeNotFoundException
- for a missing field.
PersistenceException
- if a persister operation fails.public boolean addToIdentityTree(Variable var, String parentField, String childField, String[] nameFields, Persister persister, OrderedMap<Identity,EnumeratedIdentity> tree) throws AttributeNotFoundException, PersistenceException
BeanRepositoryClient
addToIdentityTree
in interface BeanRepositoryClient
var
- the selected variable.parentField
- the parent field.childField
- the child field.nameFields
- optional name fields.persister
- the persister.tree
- the selection tree.
AttributeNotFoundException
- for a missing field.
PersistenceException
- if a persister operation fails.public boolean addToIdentityTree(Collection<? extends Variable> vars, String parentField, String childField, String[] nameFields, Persister persister, OrderedMap<Identity,EnumeratedIdentity> tree) throws AttributeNotFoundException, PersistenceException
BeanRepositoryClient
addToIdentityTree
in interface BeanRepositoryClient
vars
- the selected variables.parentField
- the parent field.childField
- the child field.nameFields
- optional name fields.persister
- the persister.tree
- the selection tree.
AttributeNotFoundException
- for a missing field.
PersistenceException
- if a persister operation fails.public boolean addToIdentityTree(Identity id, String parentField, String childField, String[] nameFields, Persister persister, OrderedMap<Identity,EnumeratedIdentity> tree) throws AttributeNotFoundException, PersistenceException
BeanRepositoryClient
addToIdentityTree
in interface BeanRepositoryClient
id
- the selected identity.parentField
- the parent field.childField
- the child field.nameFields
- optional name fields.persister
- the persister.tree
- the selection tree.
AttributeNotFoundException
- for a missing field.
PersistenceException
- if a persister operation fails.public boolean addToIdentityTree(Identity[] ids, String parentField, String childField, String[] nameFields, Persister persister, OrderedMap<Identity,EnumeratedIdentity> tree) throws AttributeNotFoundException, PersistenceException
BeanRepositoryClient
addToIdentityTree
in interface BeanRepositoryClient
ids
- the selected identities.parentField
- the parent field.childField
- the child field.nameFields
- optional name fields.persister
- the persister.tree
- the selection tree.
AttributeNotFoundException
- for a missing field.
PersistenceException
- if a persister operation fails.public boolean restoreIdentityTree(List<? extends EnumeratedAttribute> enums, int depth, String parentField, String childField, String[] nameFields, Persister persister, OrderedMap<Identity,EnumeratedIdentity> tree) throws AttributeNotFoundException, PersistenceException
BeanRepositoryClient
restoreIdentityTree
in interface BeanRepositoryClient
enums
- the enumerated identities.depth
- the depth of the tree.parentField
- the parent field.childField
- the parent field.nameFields
- optional name fields.persister
- the persister.tree
- the selection tree.
AttributeNotFoundException
- for a missing field.
PersistenceException
- if a persister operation fails.public void expandInIdentityTree(Identity id, String childField, String[] nameFields, Persister persister, OrderedMap<Identity,EnumeratedIdentity> tree) throws AttributeNotFoundException, PersistenceException
BeanRepositoryClient
expandInIdentityTree
in interface BeanRepositoryClient
id
- the selected identity.childField
- the child field.nameFields
- optional name fields.persister
- the persister.tree
- the selection tree.
AttributeNotFoundException
- for a missing field.
PersistenceException
- if a persister operation fails.public void collapseInIdentityTree(Identity id, Persister persister, OrderedMap<Identity,EnumeratedIdentity> tree) throws AttributeNotFoundException, PersistenceException
BeanRepositoryClient
collapseInIdentityTree
in interface BeanRepositoryClient
id
- the selected identity.persister
- the persister.tree
- the selection tree.
AttributeNotFoundException
- for a missing field.
PersistenceException
- if a persister operation fails.public Variable getMetaDesktop(Persister persister) throws AttributeNotFoundException, InvalidAttributeValueException, ConstructionException, PersistenceException
BeanRepositoryClient
getMetaDesktop
in interface BeanRepositoryClient
persister
- the persister.
AttributeNotFoundException
- for missing attributes.
InvalidAttributeValueException
- for invalid values.
ConstructionException
- for construction errors.
PersistenceException
- for persister errors.public Variable createMetaDesktop(String name, Object uid, Object gid, Persister persister) throws AttributeNotFoundException, InvalidAttributeValueException, ConstructionException, PersistenceException
BeanRepositoryClient
createMetaDesktop
in interface BeanRepositoryClient
name
- the folder name.uid
- the user id.gid
- the group id.persister
- the persister.
AttributeNotFoundException
- for missing attributes.
InvalidAttributeValueException
- for invalid values.
ConstructionException
- for construction errors.
PersistenceException
- for persister errors.public Variable getRootFolder(Persister persister) throws AttributeNotFoundException, InvalidAttributeValueException, ConstructionException, PersistenceException
BeanRepositoryClient
getRootFolder
in interface BeanRepositoryClient
persister
- the persister.
AttributeNotFoundException
- for missing attributes.
InvalidAttributeValueException
- for invalid values.
ConstructionException
- for construction errors.
PersistenceException
- for persister errors.public Variable getMetaFolder(Persister persister) throws AttributeNotFoundException, InvalidAttributeValueException, ConstructionException, PersistenceException
BeanRepositoryClient
getMetaFolder
in interface BeanRepositoryClient
persister
- the persister.
AttributeNotFoundException
- for missing attributes.
InvalidAttributeValueException
- for invalid values.
ConstructionException
- for construction errors.
PersistenceException
- for persister errors.public Variable createMetaFolder(String name, Object uid, Object gid, Persister persister) throws AttributeNotFoundException, InvalidAttributeValueException, ConstructionException, PersistenceException
BeanRepositoryClient
createMetaFolder
in interface BeanRepositoryClient
name
- the folder name.uid
- the user id.gid
- the group id.persister
- the persister.
AttributeNotFoundException
- for missing attributes.
InvalidAttributeValueException
- for invalid values.
ConstructionException
- for construction errors.
PersistenceException
- for persister errors.public void buildSearchVariable(Variable var, String className, Persister persister) throws AttributeNotFoundException, InvalidAttributeValueException, ConstructionException, PersistenceException
BeanRepositoryClient
buildSearchVariable
in interface BeanRepositoryClient
var
- the search variable.className
- the search class name.persister
- the persister.
AttributeNotFoundException
- for missing attributes.
InvalidAttributeValueException
- for invalid attributes.
ConstructionException
- for construction errors.
PersistenceException
- for persister errors.public DBQuery<? extends Variable> fillQueryCriteria(Variable search, DBCriteria<? extends Variable> criteria, Persister persister) throws AttributeNotFoundException
BeanRepositoryClient
fillQueryCriteria
in interface BeanRepositoryClient
search
- the search variable.criteria
- the criteria.persister
- the persister.
AttributeNotFoundException
- for missing attributes.public <T> Collection<T> queryAllObjects(DBQuery<T> query, String[] sortFields, Persister persister) throws PersistenceException
BeanRepositoryClient
queryAllObjects
in interface BeanRepositoryClient
T
- the object type.query
- the query.sortFields
- optional sort fields.persister
- the persister.
PersistenceException
- for persister errors.public <T> Collection<T> queryAllObjects(DBCriteria<T> criteria, String[] sortFields, Persister persister, Object... clazz) throws PersistenceException
BeanRepositoryClient
queryAllObjects
in interface BeanRepositoryClient
T
- the object type.criteria
- optional criteria.sortFields
- optional sort fields.persister
- the persister.clazz
- an alternate class or class name.
PersistenceException
- for persister errors.public <T> Collection<T> queryTreeObjects(DBCriteria<T> criteria, String relField, Object rpk, int depth, String[] sortFields, Persister persister, Object... clazz) throws AttributeNotFoundException, PersistenceException
BeanRepositoryClient
queryTreeObjects
in interface BeanRepositoryClient
T
- the object type.criteria
- optional criteria.relField
- the relation field.rpk
- an optional root primary key.depth
- the tree depth (-1 = bottom).sortFields
- optionals sort field.persister
- the persister.clazz
- an alternate class or class name.
AttributeNotFoundException
- for missing attributes.
PersistenceException
- for persister errors.public <T> Map<Object,T> queryAllMemberGroups(String className, String[] sortFields, Persister persister) throws AttributeNotFoundException, PersistenceException
BeanRepositoryClient
queryAllMemberGroups
in interface BeanRepositoryClient
T
- the group type.className
- the class name.sortFields
- optional sort fields.persister
- the persister.
AttributeNotFoundException
- for missing attributes.
PersistenceException
- for persister errors.public <T> Map<Object,T> queryParentMemberGroups(String className, String[] sortFields, Persister persister) throws AttributeNotFoundException, PersistenceException
BeanRepositoryClient
queryParentMemberGroups
in interface BeanRepositoryClient
T
- the group type.className
- the class name.sortFields
- optional sort fields.persister
- the persister.
AttributeNotFoundException
- for missing attributes.
PersistenceException
- for persister errors.public <T> Map<Object,T> queryChildMemberGroups(String className, String[] sortFields, Persister persister) throws AttributeNotFoundException, PersistenceException
BeanRepositoryClient
queryChildMemberGroups
in interface BeanRepositoryClient
T
- the group type.className
- the class name.sortFields
- optional sort fields.persister
- the persister.
AttributeNotFoundException
- for missing attributes.
PersistenceException
- for persister errors.public Variable queryMetaElement(Identity id, Permission permission, Persister persister) throws AccessDeniedException, PersistenceException
BeanRepositoryClient
queryMetaElement
in interface BeanRepositoryClient
id
- the meta element identity.permission
- the requested permission.persister
- the persister.
AccessDeniedException
- for missing rights.
PersistenceException
- for persister errors.public boolean checkMetaElement(Variable element, Permission permission, Persister persister)
BeanRepositoryClient
checkMetaElement
in interface BeanRepositoryClient
element
- the meta element.permission
- the requested permission.persister
- the persister.
public DBCriteria<Variable> createPermissionCriteria(String className, Object oid, Object uid, Object[] gids, boolean others, Permission permission, Persister persister)
RepositoryClient
createPermissionCriteria
in interface RepositoryClient
createPermissionCriteria
in class DefaultRepositoryClient
className
- the variable class name.oid
- the owner id.uid
- the user id.gids
- the group ids.others
- the others option.permission
- the reuqested permission.persister
- the persister.
public DBCriteria<? extends Variable> createUserPermissionCriteria(String className, Permission permission, Persister persister) throws AttributeNotFoundException, PersistenceException
RepositoryClient
createUserPermissionCriteria
in interface RepositoryClient
createUserPermissionCriteria
in class DefaultRepositoryClient
className
- the element class name.permission
- the permission.persister
- the persister.
AttributeNotFoundException
- for missing attributes.
PersistenceException
- for persister errors.protected ResourceMap getResourceMap()
protected VariableRegistry getVariableRegistry()
protected DBCriteria<Variable> createPermissionCriteria(String className, Object oid, Object uid, Object[] gids, boolean others, boolean recordp, Permission permission, Persister persister)
className
- the meta element class name.oid
- the owner id.uid
- the user id.gids
- the group ids.others
- the others option.recordp
- the record option.permission
- the permission.persister
- the persister.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |