|
Copyright © 2006 BEA Systems, Inc. All Rights Reserved | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.bea.apps.groupspace.controls.generic.ContentControlBaseImpl<T,V>
public abstract class ContentControlBaseImpl<T extends ContentBase,V extends FolderBase>
Copyright (c) 2005-2006 by BEA Systems, Inc. All Rights Reserved.
Defines general operations for dealing with CM content. This class is meant to be used OUTSIDE of a GroupSpace community, since it will bypass GroupSpace security/role mappings Declarative instantiation (@Control fooControl;
) from a PageFlow or from another control
is the preferred method of instantiating controls (as this will supply the control a proper
Control Container Context (CCC)). Should the control be instantiated programmatically, from a
different context or with an application scope (rather than webapp), extra measures should be taken:
AppScopedControlsFactory
to obtain the CCC
ControlFilter
in web.xml
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface com.bea.apps.groupspace.controls.generic.ContentControlBase |
---|
ContentControlBase.NodeSearchType, ContentControlBase.Params |
Field Summary | |
---|---|
static int |
ALL_TYPES
|
protected Class<T> |
beanClass
|
protected static ContentFactory |
contentFactory
|
static int |
DEFAULT_SEARCH_LOAD_SIZE
|
protected static INodeManager |
nodeManager
|
protected String |
objectClassType
|
protected ID |
repoID
|
protected String |
repoName
|
protected static ISearchManager |
searchManager
|
protected static ITypeManager |
typeManager
|
Constructor Summary | |
---|---|
ContentControlBaseImpl()
|
Method Summary | |
---|---|
protected ContentContext |
cc()
Update the ContentContext object on each method invocation to keep it in sync with the current Request. |
protected abstract V |
createFolderObject(Node node)
|
protected abstract T |
createObject(Node node)
Creates an object of type T that wraps the node supplied as an argument |
ObjectClass |
createObjectClass()
Creates an ObjectClass for the given control |
Set<T> |
createObjects(Node[] nodes)
Create a collection of things from an array of Nodes |
Set<T> |
createObjects(Set<Node> nodes)
Create a collection of things from a set of Nodes |
protected abstract ObjectClass |
createType()
|
T |
findById(String nodeIdString)
Find an item based on its Node ID |
SortableFilterablePagedResult<T> |
findMany(String expression,
String[] searchPaths)
Retrieve a set of things based on properties in an expression. |
SortableFilterablePagedResult<T> |
findMany(String expression,
String[] searchPaths,
SortCriteria[] sortCriteria)
Retrieve a set of things based on properties in an expression. |
SortableFilterablePagedResult<T> |
findManyChildren(String expression)
|
Set<T> |
getAll()
Get all Community Scoped Content items of a specific type |
static Set<Node> |
getAllChildren(ContentContext context,
ID topLevelNode,
int type)
Get all the children of this node, specifying whether to include content only, folders only, or both Node types. |
List<PropertyDefinition> |
getAllPropertyDefinitions()
|
protected String[] |
getAsSearchPaths(String path)
|
protected abstract String |
getContentType()
|
String |
getDefaultStringValue(String propertyName)
|
V |
getFolder(ID folderId)
Get the Folder of the Node with the supplied ID. |
protected abstract V |
getFolderByExpression(String topNodeName,
String expression,
Node communityNode)
|
protected abstract String |
getFolderContentType()
|
Set<ContentBase> |
getImmediateChildren(V parentFolder,
ContentControlBase.NodeSearchType type)
Get the immediate children of this item. |
Set<ContentBase> |
getImmediateChildren(V parentFolder,
SortCriteria[] sortCriteria,
ContentControlBase.NodeSearchType type)
Get the immediate children of this item. |
abstract SortableFilterablePagedResult<ContentBase> |
getImmediateChildrenAsPagedResult(Node node,
SortCriteria[] sortCriteria,
ContentControlBase.NodeSearchType hierarchySearchType)
Get the immediate children of this item. |
ObjectClass |
getObjectClass()
Return the object class associated with the thing T TODO move this function to CmxControl? |
protected abstract String[] |
getSearchPaths()
|
V |
getTopFolder()
Get the top-level Folder of each data type (eg, top Links folder) |
abstract Node |
getTopNode()
Get the top-level node of each data type (eg, top Links folder) |
T |
move(ID source,
ID newParent)
Move Node from one place to another |
T |
move(String source,
String newParent)
Move Node from one place to another |
protected static void |
recurseRepository(ContentContext context,
ID id,
Set nodes,
int searchType)
Recurse the repository and store id/node in a (sorted) TreeMap |
void |
remove(Node node)
Remove the node |
void |
remove(Set<T> things)
Remove the Set of things T |
void |
remove(T thing)
Remove the thing T |
void |
removeAll()
Remove all |
void |
update(Set<T> things)
Update a Set of existing things |
void |
update(T updatedThing)
Update an existing thing and flush binary/search caches |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.bea.apps.groupspace.controls.generic.ContentControlBase |
---|
findContentById |
Field Detail |
---|
public static final int ALL_TYPES
public static final int DEFAULT_SEARCH_LOAD_SIZE
protected static INodeManager nodeManager
protected static ITypeManager typeManager
protected static ISearchManager searchManager
protected static ContentFactory contentFactory
protected String objectClassType
protected String repoName
protected ID repoID
protected Class<T extends ContentBase> beanClass
Constructor Detail |
---|
public ContentControlBaseImpl()
Method Detail |
---|
public abstract Node getTopNode() throws AuthenticationException, AuthorizationException, NoSuchNodeException, RepositoryException
ContentControlBase
getTopNode
in interface ContentControlBase<T extends ContentBase,V extends FolderBase>
AuthorizationException
- throws ControlException - unchecked exception that wraps InstantiationException, IllegalAccessException,
InvocationTargetException, NodeMapper.NodeMapperException, AuthenticationException, NoSuchNodeException
RepositoryException
AuthenticationException
NoSuchNodeException
public abstract SortableFilterablePagedResult<ContentBase> getImmediateChildrenAsPagedResult(Node node, SortCriteria[] sortCriteria, ContentControlBase.NodeSearchType hierarchySearchType) throws AuthorizationException, NoSuchNodeException, RepositoryException
getImmediateChildrenAsPagedResult
in interface ContentControlBase<T extends ContentBase,V extends FolderBase>
AuthorizationException
NoSuchNodeException
RepositoryException
protected abstract T createObject(Node node)
protected abstract ObjectClass createType() throws NoSuchNodeException, RepositoryException, AuthorizationException
NoSuchNodeException
RepositoryException
AuthorizationException
protected abstract V createFolderObject(Node node)
protected abstract String getContentType()
protected abstract String getFolderContentType()
protected abstract String[] getSearchPaths() throws RepositoryException, InstantiationException
RepositoryException
InstantiationException
protected abstract V getFolderByExpression(String topNodeName, String expression, Node communityNode) throws AuthorizationException, NoSuchNodeException, RepositoryException
AuthorizationException
NoSuchNodeException
RepositoryException
public ObjectClass createObjectClass() throws NoSuchNodeException, RepositoryException, AuthorizationException
ContentControlBase
createObjectClass
in interface ContentControlBase<T extends ContentBase,V extends FolderBase>
NoSuchNodeException
RepositoryException
AuthorizationException
- throws ControlException - unchecked exception that wraps InstantiationException, IllegalAccessException,
InvocationTargetException, NodeMapper.NodeMapperException, AuthenticationException, NoSuchNodeExceptionpublic ObjectClass getObjectClass() throws AuthorizationException, NoSuchObjectClassException, RepositoryException
getObjectClass
in interface ContentControlBase<T extends ContentBase,V extends FolderBase>
AuthorizationException
NoSuchObjectClassException
RepositoryException
public SortableFilterablePagedResult<T> findManyChildren(String expression) throws AuthorizationException, NoSuchNodeException, RepositoryException
findManyChildren
in interface ContentControlBase<T extends ContentBase,V extends FolderBase>
AuthorizationException
NoSuchNodeException
RepositoryException
public SortableFilterablePagedResult<T> findMany(String expression, String[] searchPaths) throws AuthorizationException, NoSuchNodeException, RepositoryException
findMany
in interface ContentControlBase<T extends ContentBase,V extends FolderBase>
AuthorizationException
NoSuchNodeException
RepositoryException
public SortableFilterablePagedResult<T> findMany(String expression, String[] searchPaths, SortCriteria[] sortCriteria) throws AuthorizationException, NoSuchNodeException, RepositoryException
findMany
in interface ContentControlBase<T extends ContentBase,V extends FolderBase>
AuthorizationException
- throws ControlException - unchecked exception that wraps InstantiationException, IllegalAccessException,
InvocationTargetException, NodeMapper.NodeMapperException, AuthenticationException, NoSuchNodeException
RepositoryException
NoSuchNodeException
public V getFolder(ID folderId) throws AuthorizationException, NoSuchNodeException, RepositoryException
getFolder
in interface ContentControlBase<T extends ContentBase,V extends FolderBase>
AuthorizationException
NoSuchNodeException
RepositoryException
public V getTopFolder() throws AuthorizationException, NoSuchNodeException, RepositoryException
getTopFolder
in interface ContentControlBase<T extends ContentBase,V extends FolderBase>
AuthorizationException
- throws ControlException - unchecked exception that wraps InstantiationException, IllegalAccessException,
InvocationTargetException, NodeMapper.NodeMapperException, AuthenticationException, NoSuchNodeException
RepositoryException
NoSuchNodeException
public void update(T updatedThing) throws AuthorizationException, NoSuchNodeException, NoSuchPropertyException, RepositoryException
update
in interface ContentControlBase<T extends ContentBase,V extends FolderBase>
AuthorizationException
- throws ControlException - unchecked exception that wraps AuthenticationException, NoSuchPropertyException,
InstantiationException, IllegalAccessException, InvocationTargetException,
NodeMapper.NodeMapperException, IOException
RepositoryException
NoSuchNodeException
NoSuchPropertyException
public void update(Set<T> things) throws AuthorizationException, NoSuchNodeException, NoSuchPropertyException, RepositoryException
update
in interface ContentControlBase<T extends ContentBase,V extends FolderBase>
AuthorizationException
- throws ControlException - unchecked exception that wraps AuthenticationException, NoSuchPropertyException,
InstantiationException, IllegalAccessException, InvocationTargetException,
NodeMapper.NodeMapperException, IOException
RepositoryException
NoSuchNodeException
NoSuchPropertyException
public Set<T> getAll() throws AuthorizationException, NoSuchNodeException, RepositoryException
AuthorizationException
NoSuchNodeException
RepositoryException
public Set<ContentBase> getImmediateChildren(V parentFolder, ContentControlBase.NodeSearchType type) throws AuthorizationException, NoSuchNodeException, RepositoryException
getImmediateChildren
in interface ContentControlBase<T extends ContentBase,V extends FolderBase>
AuthorizationException
NoSuchNodeException
RepositoryException
public Set<ContentBase> getImmediateChildren(V parentFolder, SortCriteria[] sortCriteria, ContentControlBase.NodeSearchType type) throws AuthorizationException, NoSuchNodeException, RepositoryException
getImmediateChildren
in interface ContentControlBase<T extends ContentBase,V extends FolderBase>
AuthorizationException
NoSuchNodeException
RepositoryException
public void remove(T thing) throws AuthorizationException, RepositoryException
ContentControlBase
remove
in interface ContentControlBase<T extends ContentBase,V extends FolderBase>
AuthorizationException
- throws ControlException - unchecked exception that wraps AuthenticationException
RepositoryException
public void remove(Node node) throws AuthorizationException, RepositoryException
ContentControlBase
remove
in interface ContentControlBase<T extends ContentBase,V extends FolderBase>
AuthorizationException
- throws ControlException - unchecked exception that wraps AuthenticationException
RepositoryException
public void remove(Set<T> things) throws AuthorizationException, RepositoryException
ContentControlBase
remove
in interface ContentControlBase<T extends ContentBase,V extends FolderBase>
AuthorizationException
- throws ControlException - unchecked exception that wraps AuthenticationException
RepositoryException
public void removeAll() throws AuthorizationException, RepositoryException
ContentControlBase
removeAll
in interface ContentControlBase<T extends ContentBase,V extends FolderBase>
AuthorizationException
- throws ControlException - unchecked exception that wraps InstantiationException, IllegalAccessException,
InvocationTargetException, NodeMapper.NodeMapperException, AuthenticationException, NoSuchNodeException
RepositoryException
public T move(ID source, ID newParent) throws AuthorizationException, NoSuchNodeException, RepositoryException
move
in interface ContentControlBase<T extends ContentBase,V extends FolderBase>
AuthorizationException
NoSuchNodeException
- throws ControlException - unchecked exception that wraps AuthenticationException
RepositoryException
public T move(String source, String newParent) throws AuthorizationException, NoSuchNodeException, RepositoryException
move
in interface ContentControlBase<T extends ContentBase,V extends FolderBase>
AuthorizationException
NoSuchNodeException
- throws ControlException - unchecked exception that wraps AuthenticationException
RepositoryException
public T findById(String nodeIdString) throws AuthorizationException, NoSuchNodeException, RepositoryException
findById
in interface ContentControlBase<T extends ContentBase,V extends FolderBase>
AuthorizationException
- throws ControlException - unchecked exception that wraps InstantiationException, IllegalAccessException,
InvocationTargetException, NodeMapper.NodeMapperException, AuthenticationException, NoSuchNodeException
RepositoryException
NoSuchNodeException
public Set<T> createObjects(Set<Node> nodes) throws AuthorizationException
createObjects
in interface ContentControlBase<T extends ContentBase,V extends FolderBase>
AuthorizationException
public Set<T> createObjects(Node[] nodes) throws AuthorizationException
createObjects
in interface ContentControlBase<T extends ContentBase,V extends FolderBase>
AuthorizationException
public static Set<Node> getAllChildren(ContentContext context, ID topLevelNode, int type) throws AuthorizationException, NoSuchNodeException, RepositoryException
AuthorizationException
NoSuchNodeException
RepositoryException
protected static void recurseRepository(ContentContext context, ID id, Set nodes, int searchType) throws AuthorizationException, NoSuchNodeException, RepositoryException
context
- The content context objectid
- Starting point ID for looking in repositorynodes
- Set for storing nodessearchType
- Node.CONTENT, Node.HIERARCHY, or -1 for all
AuthorizationException
NoSuchNodeException
RepositoryException
protected String[] getAsSearchPaths(String path)
protected ContentContext cc()
public List<PropertyDefinition> getAllPropertyDefinitions() throws AuthorizationException, NoSuchObjectClassException, RepositoryException
getAllPropertyDefinitions
in interface ContentControlBase<T extends ContentBase,V extends FolderBase>
AuthorizationException
NoSuchObjectClassException
RepositoryException
public String getDefaultStringValue(String propertyName) throws RepositoryException
getDefaultStringValue
in interface ContentControlBase<T extends ContentBase,V extends FolderBase>
RepositoryException
|
Copyright © 2006 BEA Systems, Inc. All Rights Reserved | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |