com.bea.apps.groupspace.controls.generic
Class FoldersControlImpl

java.lang.Object
  extended by com.bea.apps.groupspace.controls.generic.ContentControlBaseImpl<T,Folder>
      extended by com.bea.apps.groupspace.controls.generic.GroupSpaceContentControlImpl<Folder>
          extended by com.bea.apps.groupspace.controls.generic.FoldersControlImpl
All Implemented Interfaces
ContentControlBase<Folder,Folder>, FoldersControl, GroupSpaceContentControl<Folder>, Serializable

public class FoldersControlImpl
extends GroupSpaceContentControlImpl<Folder>
implements FoldersControl, Serializable

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  String repoPath
           
 
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
FoldersControlImpl()
           
 
Method Summary
 Folder create(String title, String description, CommunityContent.Visibility visibility, String owner, Folder parentFolder)
          This one creates the issue below an empty folder.
 Folder create(String title, String description, CommunityContent.Visibility visibility, String owner, ID parentID)
           
 Folder createFolder(String name, ID parentID)
          This gives the default visiblity of "COMMUNITY" and owner as the current principal username.
protected  Folder createObject(Node node)
          We're creating a Folder from a Node
 ObjectClass createType()
           
 Folder findFolder(String searchExpression, String searchPath)
          Find folder
protected  Node getCommunityFolderNode()
          retrieves top community node
 Folder getFolder(String name, Node searchFromNode)
          Look for it before creating.
 Folder getFolder(String name, String searchExpression, Node searchFromNode)
          Look for it before creating.
 Folder getFolder(String name, String searchExpression, Node searchFromNode, CommunityContent.Visibility visibility, String owner)
          Look for it before creating.
protected  Folder getFolderByExpression(String name, String expression, Node communityNode)
           
 Folder getTopFolder(String contentType)
           
 Folder getUserFolder(String username)
          Get the user folder associated with this user.
 void onCreate()
          Put any other init params here.
 
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, getTopNode, move, promoteToCommunity, remove, removeAll, removeCommunityAndPrivate, removePersonal, removePrivate, update
 
Methods inherited from class com.bea.apps.groupspace.controls.generic.ContentControlBaseImpl
createObjectClass, createObjects, createObjects, 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, getTopNode, move, move, remove, remove, remove, removeAll, update, update
 

Field Detail

repoPath

protected String repoPath
Constructor Detail

FoldersControlImpl

public FoldersControlImpl()
Method Detail

create

public Folder create(String title,
                     String description,
                     CommunityContent.Visibility visibility,
                     String owner,
                     Folder parentFolder)
              throws AuthenticationException,
                     AuthorizationException,
                     NodeExistsException,
                     NoSuchObjectClassException,
                     RepositoryException,
                     InstantiationException,
                     IllegalAccessException,
                     InvocationTargetException
This one creates the issue below an empty folder. The parent folder is a hierarchy node.

Specified by:
create in interface FoldersControl
Returns
new Folder
Throws
AuthenticationException
AuthorizationException
NodeExistsException
NoSuchObjectClassException
RepositoryException
InstantiationException
IllegalAccessException
InvocationTargetException

create

public Folder create(String title,
                     String description,
                     CommunityContent.Visibility visibility,
                     String owner,
                     ID parentID)
              throws AuthenticationException,
                     AuthorizationException,
                     NodeExistsException,
                     NoSuchObjectClassException,
                     RepositoryException,
                     InstantiationException,
                     IllegalAccessException,
                     InvocationTargetException
Specified by:
create in interface FoldersControl
Throws
AuthenticationException
AuthorizationException
NodeExistsException
NoSuchObjectClassException
RepositoryException
InstantiationException
IllegalAccessException
InvocationTargetException

createObject

protected Folder createObject(Node node)
We're creating a Folder from a Node

Specified by:
createObject in class ContentControlBaseImpl<Folder,Folder>

createType

public ObjectClass createType()
                       throws NoSuchNodeException,
                              RepositoryException,
                              AuthorizationException
Specified by:
createType in class ContentControlBaseImpl<Folder,Folder>
Throws
NoSuchNodeException
RepositoryException
AuthorizationException

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. It MUST be run from the web tier, where the Request is available for us to get at the user principal (entitlements requires it).

Specified by:
getUserFolder in interface FoldersControl
Throws
InstantiationException
IllegalAccessException
InvocationTargetException
com.bea.content.nodemappers.NodeMapper.NodeMapperException
AuthenticationException
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<Folder>
Specified by:
createFolder in class GroupSpaceContentControlImpl<Folder>
Throws
AuthorizationException
NodeExistsException - throws ControlException - unchecked exception that wraps AuthenticationException, NoSuchObjectClassException, InstantiationException, IllegalAccessException, InvocationTargetException
RepositoryException

findFolder

public Folder findFolder(String searchExpression,
                         String searchPath)
                  throws InstantiationException,
                         IllegalAccessException,
                         InvocationTargetException,
                         com.bea.content.nodemappers.NodeMapper.NodeMapperException,
                         AuthenticationException,
                         AuthorizationException,
                         NoSuchNodeException,
                         RepositoryException
Find folder

Specified by:
findFolder in interface FoldersControl
Returns
Throws
InstantiationException
IllegalAccessException
InvocationTargetException
NodeMapper.NodeMapperException
AuthenticationException
AuthorizationException
NoSuchNodeException
RepositoryException

getFolder

public Folder getFolder(String name,
                        Node searchFromNode)
                 throws InstantiationException,
                        IllegalAccessException,
                        InvocationTargetException,
                        com.bea.content.nodemappers.NodeMapper.NodeMapperException,
                        AuthenticationException,
                        AuthorizationException,
                        NoSuchNodeException,
                        RepositoryException
Look for it before creating. Take default visibility "Community" and owner "GroupSpace"

Specified by:
getFolder in interface FoldersControl
Throws
InstantiationException
IllegalAccessException
InvocationTargetException
com.bea.content.nodemappers.NodeMapper.NodeMapperException
AuthenticationException
AuthorizationException
NoSuchNodeException
RepositoryException

getFolder

public Folder getFolder(String name,
                        String searchExpression,
                        Node searchFromNode)
                 throws InstantiationException,
                        IllegalAccessException,
                        InvocationTargetException,
                        com.bea.content.nodemappers.NodeMapper.NodeMapperException,
                        AuthenticationException,
                        AuthorizationException,
                        NoSuchNodeException,
                        RepositoryException
Look for it before creating. Take default visibility "Community" and owner "GroupSpace"

Specified by:
getFolder in interface FoldersControl
Throws
InstantiationException
IllegalAccessException
InvocationTargetException
com.bea.content.nodemappers.NodeMapper.NodeMapperException
AuthenticationException
AuthorizationException
NoSuchNodeException
RepositoryException

getTopFolder

public Folder getTopFolder(String contentType)
                    throws InstantiationException,
                           IllegalAccessException,
                           InvocationTargetException,
                           com.bea.content.nodemappers.NodeMapper.NodeMapperException,
                           AuthenticationException,
                           AuthorizationException,
                           NoSuchNodeException,
                           RepositoryException
Specified by:
getTopFolder in interface FoldersControl
Returns
Folder
Throws
InstantiationException
IllegalAccessException
InvocationTargetException
NodeMapper.NodeMapperException
AuthenticationException
AuthorizationException
NoSuchNodeException
RepositoryException

getFolder

public Folder getFolder(String name,
                        String searchExpression,
                        Node searchFromNode,
                        CommunityContent.Visibility visibility,
                        String owner)
                 throws InstantiationException,
                        IllegalAccessException,
                        InvocationTargetException,
                        com.bea.content.nodemappers.NodeMapper.NodeMapperException,
                        AuthenticationException,
                        AuthorizationException,
                        NoSuchNodeException,
                        RepositoryException
Look for it before creating. Specify visibility and owner

Specified by:
getFolder in interface FoldersControl
Throws
InstantiationException
IllegalAccessException
InvocationTargetException
com.bea.content.nodemappers.NodeMapper.NodeMapperException
AuthenticationException
AuthorizationException
NoSuchNodeException
RepositoryException

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

getFolderByExpression

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

onCreate

public void onCreate()
              throws org.apache.beehive.controls.api.ControlException
Put any other init params here. Note they can go on the control interface annotations. See the CM_Control.java file for an example of declaring parameters, and the CM_ControlImpl.jcs file for accessing those parameters

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


Copyright © 2006 BEA Systems, Inc. All Rights Reserved