com.bea.apps.groupspace.controls.generic
Class CM_ControlImpl<T extends CommunityContent>

java.lang.Object
  extended by com.bea.apps.groupspace.controls.generic.ContentControlBaseImpl<T,Folder>
      extended by com.bea.apps.groupspace.controls.generic.GroupSpaceContentControlImpl<T>
          extended by com.bea.apps.groupspace.controls.generic.CM_ControlImpl<T>
All Implemented Interfaces
CM_Control<T>, ContentControlBase<T,Folder>, GroupSpaceContentControl<T>, Serializable
Direct Known Subclasses:
AnnouncementsControlImpl, FeedEntriesControlImpl, FeedFoldersControlImpl, GsDocControlImpl, IssuesControlImpl, LinksControlImpl, RichTextControlImpl, SavedSearchControlImpl

public abstract class CM_ControlImpl<T extends CommunityContent>
extends GroupSpaceContentControlImpl<T>
implements CM_Control<T>, Serializable

Copyright (c) 2005-2006 by BEA Systems, Inc. All Rights Reserved.

This control layer is here to allow non-Folder controls to access the FoldersControl

Both FoldersControl and this CM_Control extend GroupSpaceContentControl; CM_Control uses FoldersControl

Only calls to FoldersControl folderControl should reside at this level

See Also
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from interface com.bea.apps.groupspace.controls.generic.ContentControlBase
ContentControlBase.NodeSearchType, ContentControlBase.Params
 
Field Summary
protected  CommunityContentCmxControl ccCmxControl
           
protected  FoldersControl folderControl
           
protected  Node topNode
          Top-level node for storing a particular type of content
protected  String topNodeName
           
 
Fields inherited from class com.bea.apps.groupspace.controls.generic.GroupSpaceContentControlImpl
ALL_TYPES, contentContext
 
Fields inherited from class com.bea.apps.groupspace.controls.generic.ContentControlBaseImpl
beanClass, contentFactory, DEFAULT_SEARCH_LOAD_SIZE, nodeManager, objectClassType, repoID, repoName, searchManager, typeManager
 
Constructor Summary
CM_ControlImpl()
           
 
Method Summary
 Folder createFolder(String name, ID parentID)
          This gives the default visiblity of "COMMUNITY" and owner as the current principal username.
protected  Node getCommunityFolderNode()
          retrieves top community node
protected  Folder getDefaultFolder(CommunityContent.Visibility visibility)
          Determines whether the default folder is the user's personal folder or the top content folder
protected  Folder getFolderByExpression(String topNodeName, String expression, Node communityNode)
           
 Folder getPersonalContentFolder()
          Get the user folder associated with type of content.
 Node getTopNode()
          Get the top-level node of each data type (eg, top Links folder)
 Folder getUserFolder(String username)
          Get the user folder associated with this user.
 void onCreate()
          Must use this instead of class constructors -- this is where we'll get annotated values and set into our class attributes.
 
Methods inherited from class com.bea.apps.groupspace.controls.generic.GroupSpaceContentControlImpl
asSet, createFolder, findByDescription, findById, findByTitle, findContentById, findMany, getAll, getAllNodes, getCommunity, getCommunityAndPrivate, getCommunityFolder, getFolder, getImmediateChildrenAsPagedResult, getPersonal, getPrivate, getReferencingContent, getReferencingContent, getRelatedContent, move, promoteToCommunity, remove, removeAll, removeCommunityAndPrivate, removePersonal, removePrivate, update
 
Methods inherited from class com.bea.apps.groupspace.controls.generic.ContentControlBaseImpl
createObject, createObjectClass, createObjects, createObjects, createType, findMany, findManyChildren, getAllChildren, getAllPropertyDefinitions, getDefaultStringValue, getImmediateChildren, getImmediateChildren, getObjectClass, getTopFolder, move, recurseRepository, remove, remove, update
 
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.GroupSpaceContentControl
asSet, createFolder, findByDescription, findByTitle, getCommunity, getCommunityAndPrivate, getCommunityFolder, getPersonal, getPrivate, getReferencingContent, getReferencingContent, getRelatedContent, promoteToCommunity, removeCommunityAndPrivate, removePersonal, removePrivate
 
Methods inherited from interface com.bea.apps.groupspace.controls.generic.ContentControlBase
createObjectClass, createObjects, createObjects, findById, findContentById, findMany, findMany, findManyChildren, getAllPropertyDefinitions, getDefaultStringValue, getFolder, getImmediateChildren, getImmediateChildren, getImmediateChildrenAsPagedResult, getObjectClass, getTopFolder, move, move, remove, remove, remove, removeAll, update, update
 

Field Detail

topNode

protected Node topNode
Top-level node for storing a particular type of content


topNodeName

protected String topNodeName

ccCmxControl

protected CommunityContentCmxControl ccCmxControl

folderControl

protected FoldersControl folderControl
Constructor Detail

CM_ControlImpl

public CM_ControlImpl()
Method Detail

getCommunityFolderNode

protected Node getCommunityFolderNode()
                               throws InstantiationException,
                                      IllegalAccessException,
                                      InvocationTargetException,
                                      com.bea.content.nodemappers.NodeMapper.NodeMapperException,
                                      RepositoryException
Description copied from class: GroupSpaceContentControlImpl
retrieves top community node

Returns
Throws
InstantiationException
IllegalAccessException
InvocationTargetException
NodeMapper.NodeMapperException
RepositoryException

getDefaultFolder

protected Folder getDefaultFolder(CommunityContent.Visibility visibility)
                           throws InstantiationException,
                                  IllegalAccessException,
                                  InvocationTargetException,
                                  com.bea.content.nodemappers.NodeMapper.NodeMapperException,
                                  AuthenticationException,
                                  AuthorizationException,
                                  NoSuchNodeException,
                                  RepositoryException
Determines whether the default folder is the user's personal folder or the top content folder

Parameters
visibility -
Returns
Throws
InstantiationException
IllegalAccessException
InvocationTargetException
NodeMapper.NodeMapperException
AuthenticationException
AuthorizationException
NoSuchNodeException
RepositoryException

getFolderByExpression

protected Folder getFolderByExpression(String topNodeName,
                                       String expression,
                                       Node communityNode)
                                throws AuthorizationException,
                                       NoSuchNodeException,
                                       RepositoryException
Specified by:
getFolderByExpression in class ContentControlBaseImpl<T extends CommunityContent,Folder>
Throws
AuthorizationException
NoSuchNodeException
RepositoryException

createFolder

public Folder createFolder(String name,
                           ID parentID)
                    throws AuthorizationException,
                           NodeExistsException,
                           RepositoryException
This gives the default visiblity of "COMMUNITY" and owner as the current principal username. As the description is also a required field (imposed by the control), we let the folder name equal its title.

Specified by:
createFolder in interface GroupSpaceContentControl<T extends CommunityContent>
Specified by:
createFolder in class GroupSpaceContentControlImpl<T extends CommunityContent>
Throws
AuthorizationException
NodeExistsException - throws ControlException - unchecked exception that wraps AuthenticationException, NoSuchObjectClassException, InstantiationException, IllegalAccessException, InvocationTargetException
RepositoryException

getUserFolder

public Folder getUserFolder(String username)
                     throws InstantiationException,
                            IllegalAccessException,
                            InvocationTargetException,
                            com.bea.content.nodemappers.NodeMapper.NodeMapperException,
                            AuthenticationException,
                            AuthorizationException,
                            NoSuchNodeException,
                            RepositoryException
Get the user folder associated with this user. OWNER=username, VISIBILITY="Personal"

Throws
InstantiationException
IllegalAccessException
InvocationTargetException
com.bea.content.nodemappers.NodeMapper.NodeMapperException
AuthenticationException
AuthorizationException
NoSuchNodeException
RepositoryException

getPersonalContentFolder

public Folder getPersonalContentFolder()
                                throws InstantiationException,
                                       IllegalAccessException,
                                       InvocationTargetException,
                                       com.bea.content.nodemappers.NodeMapper.NodeMapperException,
                                       AuthenticationException,
                                       AuthorizationException,
                                       NoSuchNodeException,
                                       RepositoryException
Get the user folder associated with type of content. For example, personal links for user 'jdoe' will be stored under .../jdoe/Links/* The username is taken from the Request, so this method must be called from the web tier. OWNER=username, VISIBILITY="PERSONAL"

Specified by:
getPersonalContentFolder in interface CM_Control<T extends CommunityContent>
Throws
InstantiationException
IllegalAccessException
InvocationTargetException
com.bea.content.nodemappers.NodeMapper.NodeMapperException
AuthenticationException
AuthorizationException
NoSuchNodeException
RepositoryException

getTopNode

public Node getTopNode()
                throws AuthorizationException,
                       NoSuchNodeException,
                       RepositoryException
Get the top-level node of each data type (eg, top Links folder)

Specified by:
getTopNode in interface ContentControlBase<T extends CommunityContent,Folder>
Overrides:
getTopNode in class GroupSpaceContentControlImpl<T extends CommunityContent>
Throws
AuthorizationException - throws ControlException - unchecked exception that wraps InstantiationException, IllegalAccessException, InvocationTargetException, NodeMapper.NodeMapperException, AuthenticationException, NoSuchNodeException
RepositoryException
NoSuchNodeException

onCreate

public void onCreate()
              throws org.apache.beehive.controls.api.ControlException
Must use this instead of class constructors -- this is where we'll get annotated values and set into our class attributes.

Throws
org.apache.beehive.controls.api.ControlException


Copyright © 2006 BEA Systems, Inc. All Rights Reserved