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

## com.bea.content.virtual.lifecycle
Class LifeCycle

    java.lang.Object
      com.bea.content.virtual.lifecycle.LifeCycle

All Implemented Interfaces:
  Serializable

public class LifeCycle
extends Object
implements Serializable

Represents the Life Cycle for a Node and defines the valid status transitions. Below are valid transitions available with the current status:
From New (no status yet) to DRAFT to READY to PUBLISHED if user is in a publisher role to RETIRED if user is in a publisher role From DRAFT to READY to PUBLISHED if user is in a publisher role to RETIRED if user is in a publisher role From READY to REJECTED if user is in a publisher role to PUBLISHED if user is in a publisher role to RETIRED if user is in a publisher role From REJECTED to DRAFT to READY From PUBLISHED - there are no valid transitions from PUBLISHED. When a PUBLISHED Node is checked out it automatically goes to DRAFT so it can never transition from a PUBLISHED status. From RETIRED to DRAFT to READY to PUBLISHED if user is in a publisher role Upon status transition the following occurs: --> Status transition to READY : Assigned to user will be null. Assigned To Roles will be set to the roles that can publish this node --> Status transition to PUBLISHED : Assigned to user will be null. Assigned To Roles will be null --> Status transition to REJECTED : Assigned to roles will be null. Assigned to user will be the last user (who is not in the publishers role for that node) that was editing the node. This is an invalid status for a new content item/node. --> Status transition to RETIRED : Assigned to user will be set to null. --> Status transition to DRAFT : Assigned to user will remain as it is.

See Also:
  Serialized Form

Field Summary
`static int` | `DRAFT`
`static String` | `LIFECYCLE_STATUS_FIELD`
`static int` | `PUBLISHED`
`static int` | `READY`
`static int` | `REJECTED`
`protected RepositoryManager` | `repositoryManager`
`static int` | `RETIRED`

Constructor Summary
`LifeCycle(RepositoryManager repositoryManager)`

Method Summary
`String` | `buildTaxonomy(ID nodeId)` Build a taxonomy for the node id
`String` | `debugGetStatusText(int status)` Debug method to return a string equivalent of the status
`String` | `getId(ID id)`
`Set` | `getPublishRolesForNode(ID nodeId)` Return all the published roles for the node represented by the node id.
`List` | `getStatusTransitions(ContentContext context, ID nodeId, int currentStatus)` Returns a list of valid status transitions for the user.
`boolean` | `isUserInRole(ContentContext context, Set set)` Checks to see if the current user is in any one of the passed in roles for that particular node

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### DRAFT

    public static final int DRAFT

See Also:
  Constant Field Values

### LIFECYCLE_STATUS_FIELD

    public static final String LIFECYCLE_STATUS_FIELD

See Also:
  Constant Field Values

### PUBLISHED

    public static final int PUBLISHED

See Also:
  Constant Field Values

### READY

    public static final int READY

See Also:
  Constant Field Values

### REJECTED

    public static final int REJECTED

See Also:
  Constant Field Values

### repositoryManager

    protected RepositoryManager repositoryManager

### RETIRED

    public static final int RETIRED

See Also:
  Constant Field Values

Constructor Detail

### LifeCycle

    public LifeCycle(RepositoryManager repositoryManager)

Method Detail

### buildTaxonomy

    public String buildTaxonomy(ID nodeId)
                         throws AuthenticationException,
                                AuthorizationException,
                                NoSuchNodeException,
                                RepositoryException

  Build a taxonomy for the node id

  Parameters:
    `nodeId` -
  Returns:
  Throws:
    `AuthenticationException`
    `AuthorizationException`
    `NoSuchNodeException`
    `RepositoryException`

### debugGetStatusText

    public String debugGetStatusText(int status)

  Debug method to return a string equivalent of the status

  Parameters:
    `status` - The status integer
  Returns:
    A string indicating the type of status

### getId

    public String getId(ID id)

### getPublishRolesForNode

    public Set getPublishRolesForNode(ID nodeId)
                               throws AuthenticationException,
                                      AuthorizationException,
                                      NoSuchNodeException,
                                      RepositoryException

  Return all the published roles for the node represented by the node id. This will not only find the published role on that node id, but will also try to find published roles which are inherited by the node id. Finally, it will append the "Admin" role to the publish roles list.

  Parameters:
    `nodeId` -
  Returns:
    A Set of string roles for the given node id.
  Throws:
    `AuthenticationException`
    `AuthorizationException`
    `NoSuchNodeException`
    `RepositoryException`

### getStatusTransitions

    public List getStatusTransitions(ContentContext context,
                                     ID nodeId,
                                     int currentStatus)

  Returns a list of valid status transitions for the user. The list contains Integer values of Status Transitions.

  Parameters:
    `context` -
    `currentStatus` -
  Returns:

### isUserInRole

    public boolean isUserInRole(ContentContext context,
                                Set set)
                         throws com.bea.p13n.entitlements.common.EntitlementsException

  Checks to see if the current user is in any one of the passed in roles for that particular node

  Parameters:
    `set` - A set of passed in string roles.
  Returns:
    true or false indicating whether the user is in that role or not
  Throws:
    `com.bea.p13n.entitlements.common.EntitlementsException`

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

Copyright © 2005 BEA Systems, Inc. All Rights Reserved