Overview | Package | Class | Tree | Deprecated | Index | Help
| Copyright © 2006 BEA Systems, Inc. All Rights Reserved
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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

    java.lang.Object
      com.bea.apps.groupspace.controls.generic.ContentControlBaseImpl<T,Folder>
          com.bea.apps.groupspace.controls.generic.GroupSpaceContentControlImpl<T>

All Implemented Interfaces
  ContentControlBase<T,Folder>, GroupSpaceContentControl<T>, Serializable

Direct Known Subclasses:
  CM_ControlImpl, FoldersControlImpl

    public abstract class GroupSpaceContentControlImpl<T extends CommunityContent>

extends ContentControlBaseImpl<T,Folder>
implements GroupSpaceContentControl<T>, Serializable

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

This is a GroupSpace-specific control for performing CRUD operations. As such, it must be run in the web tier.

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:

- Application Scoped Control - must use `AppScopedControlsFactory` to obtain the CCC
- Backing File Controls - must create custom CCC to use controls from a backing file
- Servlet Test Case Controls - must include `ControlFilter` in web.xml

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
`static int` | `ALL_TYPES`
`protected ContentContext` | `contentContext` ContentContext, required for CM-related operations, and must be updated with the current request for each use.

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
`GroupSpaceContentControlImpl()`

Method Summary
`Set<T>` | `asSet(SortableFilterablePagedResult<T> pagedResults)` Convert to Set, returning an empty set if nothing is there
`Folder` | `createFolder(String name, Folder parentFolder)` Use the parent Folder
`abstract Folder` | `createFolder(String name, ID parentID)` Use the parent ID
`SortableFilterablePagedResult<T>` | `findByDescription(String description)` Returns null if none found
`T` | `findById(String nodeIdString)` Find an item based on its Node ID overridden to use GS_UtilCmxControlBean
`SortableFilterablePagedResult<T>` | `findByTitle(String title)` Returns null if none found
`ContentBase` | `findContentById(String nodeIdString)` Find an item based on its Node ID overridden to use GS_UtilCmxControlBean
`SortableFilterablePagedResult<T>` | `findMany(String expression, String[] searchPaths, SortCriteria[] sortCriteria)` Retrieve a set of things based on properties in an expression.
`Set<T>` | `getAll()` Get all items of type T including all visibilities.
`protected Set<Node>` | `getAllNodes()` Get all Nodes for this control's content type (eg, Link, Issue) this will also return all folders beneath the topNode
`Set<T>` | `getCommunity()` Get all community-scoped data beneath the top content folder
`Set<T>` | `getCommunityAndPrivate()` returns all of the children of the top node as Type T
`Folder` | `getCommunityFolder()` Return the top node of this community.
`Folder` | `getFolder(ID folderId)` Get the Folder of the Node with the supplied ID.
`SortableFilterablePagedResult<ContentBase>` | `getImmediateChildrenAsPagedResult(Node node, SortCriteria[] sortCriteria, ContentControlBase.NodeSearchType hierarchySearchType)` Get the immediate children of this item.
`Set<T>` | `getPersonal()` retrieves all of the children of the user's personal folder
`Set<T>` | `getPrivate()` Get all private-scoped data beneath the top content folder for this user
`Set<ContentBase>` | `getReferencingContent(Node node)` Return an
`Set<ContentBase>` | `getReferencingContent(T thing)` For a given content item retrieves content items that reference it via a Link Property
`Set<ContentBase>` | `getRelatedContent(T thing)` This method returns all related content that the logged in user is entitled to see
`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 overridden to use GS_UtilCmxControlBean
`void` | `promoteToCommunity(T thing, boolean promoteChildren)` please see interface documentation
`void` | `remove(Node node)` overridden to use GS_UtilCmxControlBean
`void` | `removeAll()` Remove all data of this type
`void` | `removeCommunityAndPrivate()` removes all of the children of the top node
`void` | `removePersonal()` removes all of the children of the user's personal folder
`void` | `removePrivate()` removes all of the user's private data of type T
`void` | `update(T updatedThing)` Update an existing thing and flush binary/search caches todo check out interface comment to be sure comment about wrapped exceptions is right todo maybe add RepoEx part to them all to go with wrapped disclaimer overridden to use GS_UtilCmxControlBean

Methods inherited from class com.bea.apps.groupspace.controls.generic.ContentControlBaseImpl
`createObject, createObjectClass, createObjects, createObjects, createType, findMany, findManyChildren, getAllChildren, getAllPropertyDefinitions, getDefaultStringValue, getFolderByExpression, 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.ContentControlBase
`createObjectClass, createObjects, createObjects, findMany, findManyChildren, getAllPropertyDefinitions, getDefaultStringValue, getImmediateChildren, getImmediateChildren, getObjectClass, getTopFolder, move, remove, remove, update`

Field Detail

### ALL_TYPES

    public static final int ALL_TYPES

See Also
  Constants Summary

### contentContext

    protected transient ContentContext contentContext

  ContentContext, required for CM-related operations, and must be updated with the current request for each use.

Constructor Detail

### GroupSpaceContentControlImpl

    public GroupSpaceContentControlImpl()

Method Detail

### 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>`
  Specified by:
    `getTopNode` in class `ContentControlBaseImpl<T extends CommunityContent,Folder>`
  Throws
    `AuthorizationException` - throws ControlException - unchecked exception that wraps InstantiationException, IllegalAccessException, InvocationTargetException, NodeMapper.NodeMapperException, AuthenticationException, NoSuchNodeException
    `RepositoryException`
    `NoSuchNodeException`

### getCommunityFolder

    public Folder getCommunityFolder()

  Return the top node of this community. VISIBILITY="Community", OWNER="GroupSpace"

  Specified by:
    `getCommunityFolder` in interface `GroupSpaceContentControl<T extends CommunityContent>`

### getAll

    public Set<T> getAll()
                                           throws AuthorizationException,
                                                  NoSuchNodeException,
                                                  RepositoryException

  Get all items of type T including all visibilities. NOTE**** this will throw an authorization exception if trying to get private nodes for another user (unless you are admin)

  Overrides:
    `getAll` in class `ContentControlBaseImpl<T extends CommunityContent,Folder>`
  Throws
    `AuthorizationException`
    `NoSuchNodeException`
    `RepositoryException`

### removeAll

    public void removeAll()
                   throws AuthorizationException,
                          NoSuchNodeException,
                          RepositoryException

  Remove all data of this type

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

### getCommunity

    public Set<T> getCommunity()
                                                 throws AuthorizationException,
                                                        NoSuchNodeException,
                                                        RepositoryException

  Get all community-scoped data beneath the top content folder

  Specified by:
    `getCommunity` in interface `GroupSpaceContentControl<T extends CommunityContent>`
  Throws
    `AuthorizationException`
    `NoSuchNodeException`
    `RepositoryException`

### getPrivate

    public Set<T> getPrivate()
                                               throws AuthorizationException,
                                                      NoSuchNodeException,
                                                      RepositoryException

  Get all private-scoped data beneath the top content folder for this user

  Specified by:
    `getPrivate` in interface `GroupSpaceContentControl<T extends CommunityContent>`
  Throws
    `AuthorizationException`
    `NoSuchNodeException`
    `RepositoryException`

### getCommunityAndPrivate

    public Set<T> getCommunityAndPrivate()
                                                           throws AuthorizationException,
                                                                  NoSuchNodeException,
                                                                  RepositoryException

  Description copied from interface: `GroupSpaceContentControl`
  returns all of the children of the top node as Type T

  Specified by:
    `getCommunityAndPrivate` in interface `GroupSpaceContentControl<T extends CommunityContent>`
  Throws
    `AuthorizationException`
    `NoSuchNodeException`
    `RepositoryException`

### removePrivate

    public void removePrivate()
                       throws AuthorizationException,
                              NoSuchNodeException,
                              RepositoryException

  removes all of the user's private data of type T

  Specified by:
    `removePrivate` in interface `GroupSpaceContentControl<T extends CommunityContent>`
  Throws
    `AuthorizationException`
    `NoSuchNodeException`
    `RepositoryException`

### removeCommunityAndPrivate

    public void removeCommunityAndPrivate()
                                   throws AuthorizationException,
                                          NoSuchNodeException,
                                          RepositoryException

  Description copied from interface: `GroupSpaceContentControl`
  removes all of the children of the top node

  Specified by:
    `removeCommunityAndPrivate` in interface `GroupSpaceContentControl<T extends CommunityContent>`
  Throws
    `AuthorizationException`
    `NoSuchNodeException`
    `RepositoryException`

### getPersonal

    public Set<T> getPersonal()
                                                throws AuthorizationException,
                                                       NoSuchNodeException,
                                                       RepositoryException

  Description copied from interface: `GroupSpaceContentControl`
  retrieves all of the children of the user's personal folder

  Specified by:
    `getPersonal` in interface `GroupSpaceContentControl<T extends CommunityContent>`
  Throws
    `AuthorizationException`
    `NoSuchNodeException`
    `RepositoryException`

### removePersonal

    public void removePersonal()
                        throws AuthorizationException,
                               NoSuchNodeException,
                               RepositoryException

  Description copied from interface: `GroupSpaceContentControl`
  removes all of the children of the user's personal folder

  Specified by:
    `removePersonal` in interface `GroupSpaceContentControl<T extends CommunityContent>`
  Throws
    `AuthorizationException`
    `NoSuchNodeException`
    `RepositoryException`

### getAllNodes

    protected Set<Node> getAllNodes()
                             throws AuthorizationException,
                                    NoSuchNodeException,
                                    RepositoryException

  Description copied from class: `ContentControlBaseImpl`
  Get all Nodes for this control's content type (eg, Link, Issue) this will also return all folders beneath the topNode

  Throws
    `AuthorizationException`
    `NoSuchNodeException`
    `RepositoryException`

### getImmediateChildrenAsPagedResult

    public SortableFilterablePagedResult<ContentBase> getImmediateChildrenAsPagedResult(Node node,
                                                                                        SortCriteria[] sortCriteria,
                                                                                        ContentControlBase.NodeSearchType hierarchySearchType)
                                                                                 throws AuthorizationException,
                                                                                        NoSuchNodeException,
                                                                                        RepositoryException

  Get the immediate children of this item. Returns null if none are found.

  Specified by:
    `getImmediateChildrenAsPagedResult` in interface `ContentControlBase<T extends CommunityContent,Folder>`
  Specified by:
    `getImmediateChildrenAsPagedResult` in class `ContentControlBaseImpl<T extends CommunityContent,Folder>`
  Throws
    `AuthorizationException`
    `NoSuchNodeException`
    `RepositoryException`

### findMany

    public SortableFilterablePagedResult<T> findMany(String expression,
                                                     String[] searchPaths,
                                                     SortCriteria[] sortCriteria)
                                                                       throws AuthorizationException,
                                                                              NoSuchNodeException,
                                                                              RepositoryException

  Description copied from class: `ContentControlBaseImpl`
  Retrieve a set of things based on properties in an expression. Returns null if none are found.

  Specified by:
    `findMany` in interface `ContentControlBase<T extends CommunityContent,Folder>`
  Overrides:
    `findMany` in class `ContentControlBaseImpl<T extends CommunityContent,Folder>`
  Parameters
    `expression` -
    `searchPaths` -
    `sortCriteria` -
  Returns
  Throws
    `AuthorizationException`
    `NoSuchNodeException`
    `RepositoryException`

### asSet

    public Set<T> asSet(SortableFilterablePagedResult<T> pagedResults)

  Convert to Set, returning an empty set if nothing is there

  Specified by:
    `asSet` in interface `GroupSpaceContentControl<T extends CommunityContent>`

### update

    public void update(T updatedThing)
                throws AuthorizationException,
                       NoSuchNodeException,
                       RepositoryException

  Update an existing thing and flush binary/search caches todo check out interface comment to be sure comment about wrapped exceptions is right todo maybe add RepoEx part to them all to go with wrapped disclaimer overridden to use GS_UtilCmxControlBean

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

### remove

    public void remove(Node node)
                throws AuthorizationException,
                       RepositoryException

  overridden to use GS_UtilCmxControlBean

  Specified by:
    `remove` in interface `ContentControlBase<T extends CommunityContent,Folder>`
  Overrides:
    `remove` in class `ContentControlBaseImpl<T extends CommunityContent,Folder>`
  Throws
    `AuthorizationException` - throws ControlException - unchecked exception that wraps AuthenticationException
    `RepositoryException`

### move

    public T move(ID source,
                  ID newParent)
                                    throws AuthorizationException,
                                           NoSuchNodeException,
                                           RepositoryException

  Move Node from one place to another overridden to use GS_UtilCmxControlBean

  Specified by:
    `move` in interface `ContentControlBase<T extends CommunityContent,Folder>`
  Overrides:
    `move` in class `ContentControlBaseImpl<T extends CommunityContent,Folder>`
  Throws
    `AuthorizationException`
    `NoSuchNodeException` - throws ControlException - unchecked exception that wraps AuthenticationException
    `RepositoryException`

### findById

    public T findById(String nodeIdString)
                                        throws AuthorizationException,
                                               NoSuchNodeException,
                                               RepositoryException

  Find an item based on its Node ID overridden to use GS_UtilCmxControlBean

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

### findContentById

    public ContentBase findContentById(String nodeIdString)
                                throws AuthorizationException,
                                       NoSuchNodeException,
                                       RepositoryException

  Find an item based on its Node ID overridden to use GS_UtilCmxControlBean

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

### createFolder

    public abstract Folder createFolder(String name,
                                        ID parentID)
                                 throws AuthorizationException,
                                        NodeExistsException,
                                        RepositoryException

  Use the parent ID

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

### createFolder

    public Folder createFolder(String name,
                               Folder parentFolder)
                        throws AuthorizationException,
                               NodeExistsException,
                               RepositoryException

  Use the parent Folder

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

### findByTitle

    public SortableFilterablePagedResult<T> findByTitle(String title)
                                                                          throws AuthorizationException,
                                                                                 NoSuchNodeException,
                                                                                 RepositoryException

  Returns null if none found

  Specified by:
    `findByTitle` in interface `GroupSpaceContentControl<T extends CommunityContent>`
  Throws
    `AuthorizationException`
    `RepositoryException`
    `NodeExistsException` - throws ControlException - unchecked exception that wraps InstantiationException, IllegalAccessException, InvocationTargetException, NodeMapper.NodeMapperException, AuthenticationException, NoSuchNodeException
    `NoSuchNodeException`

### findByDescription

    public SortableFilterablePagedResult<T> findByDescription(String description)
                                                                                throws AuthorizationException,
                                                                                       NoSuchNodeException,
                                                                                       RepositoryException

  Description copied from interface: `GroupSpaceContentControl`
  Returns null if none found

  Specified by:
    `findByDescription` in interface `GroupSpaceContentControl<T extends CommunityContent>`
  Throws
    `AuthorizationException`
    `RepositoryException`
    `NodeExistsException` - throws ControlException - unchecked exception that wraps InstantiationException, IllegalAccessException, InvocationTargetException, NodeMapper.NodeMapperException, AuthenticationException, NoSuchNodeException
    `NoSuchNodeException`

### getFolder

    public Folder getFolder(ID folderId)
                     throws AuthorizationException,
                            NoSuchNodeException,
                            RepositoryException

  Get the Folder of the Node with the supplied ID.

  Specified by:
    `getFolder` in interface `ContentControlBase<T extends CommunityContent,Folder>`
  Overrides:
    `getFolder` in class `ContentControlBaseImpl<T extends CommunityContent,Folder>`
  Throws
    `AuthorizationException`
    `NoSuchNodeException`
    `RepositoryException`

### promoteToCommunity

    public void promoteToCommunity(T thing,
                                   boolean promoteChildren)
                            throws AuthorizationException,
                                   NoSuchNodeException,
                                   RepositoryException,
                                   GSNonUniqueContentException,
                                   GSContentParentVisibilityException

  please see interface documentation

  Specified by:
    `promoteToCommunity` in interface `GroupSpaceContentControl<T extends CommunityContent>`
  Throws
    `AuthorizationException`
    `RepositoryException`
    `NodeExistsException` - throws ControlException - unchecked exception that wraps AuthenticationException, NoSuchPropertyException, InstantiationException, IllegalAccessException, InvocationTargetException, NodeMapper.NodeMapperException, IOException
    `NoSuchNodeException`
    `GSNonUniqueContentException`
    `GSContentParentVisibilityException`

### getRelatedContent

    public Set<ContentBase> getRelatedContent(T thing)
                                       throws RepositoryException

  This method returns all related content that the logged in user is entitled to see

  Specified by:
    `getRelatedContent` in interface `GroupSpaceContentControl<T extends CommunityContent>`
  Returns
    CommunityContent collection or an empty set
  Throws
    `AuthorizationException`
    `RepositoryException`
    `NodeExistsException` - throws ControlException - unchecked exception that wraps InstantiationException, IllegalAccessException, InvocationTargetException, NodeMapper.NodeMapperException, AuthenticationException, NoSuchNodeException

### getReferencingContent

    public Set<ContentBase> getReferencingContent(T thing)
                                           throws AuthenticationException,
                                                  AuthorizationException,
                                                  RepositoryException,
                                                  InstantiationException,
                                                  IllegalAccessException

  Description copied from interface: `GroupSpaceContentControl`
  For a given content item retrieves content items that reference it via a Link Property

  Specified by:
    `getReferencingContent` in interface `GroupSpaceContentControl<T extends CommunityContent>`
  Returns
    CommunityContent collection or an empty set
  Throws
    `AuthorizationException`
    `RepositoryException`
    `NodeExistsException` - throws ControlException - unchecked exception that wraps InstantiationException, IllegalAccessException, InvocationTargetException, NodeMapper.NodeMapperException, AuthenticationException, NoSuchNodeException
    `AuthenticationException`
    `InstantiationException`
    `IllegalAccessException`

### getReferencingContent

    public Set<ContentBase> getReferencingContent(Node node)
                                           throws AuthenticationException,
                                                  AuthorizationException,
                                                  RepositoryException,
                                                  InstantiationException,
                                                  IllegalAccessException

  Return an

  Specified by:
    `getReferencingContent` in interface `GroupSpaceContentControl<T extends CommunityContent>`
  Parameters
    `node` -
  Returns
    an empty collection if none are found
  Throws
    `AuthorizationException` - throws ControlException - unchecked exception that wraps InstantiationException, IllegalAccessException, InvocationTargetException, NodeMapper.NodeMapperException, AuthenticationException, NoSuchNodeException
    `RepositoryException`
    `AuthenticationException`
    `InstantiationException`
    `IllegalAccessException`

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2006 BEA Systems, Inc. All Rights Reserved