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

## com.ibm.workplace.wcm.api
Interface ProjectPrototype

    public interface ProjectPrototype

Models the prototype of a `ProjectTemplate`

Method Summary
`void` | `addApprovers(java.lang.String... approverNames)` Add the given names as approvers on this object.
`void` | `clearApprovers()` A convenient method to remove all approvers from the object.
`void` | `clearWorkflowActionsForState(ProjectStateSelectors.State state)` A convenient method to clear all `WorkflowAction`s currently associated with the given `State`.
`Project.ApprovalMode` | `getApprovalMode()` Get the `ApprovalMode` set on this object.
`Project.CommentMode` | `getCommentMode()` Gets the `CommentMode` set on this project.
`java.lang.String[]` | `getCurrentApprovers()` Returns a string array of members who have Approver access to this object.
`Project.PublishOptions` | `getPublishOption()` Get the `PublishOption` set on this object.
`DocumentId[]` | `getWorkflowActionsForState(ProjectStateSelectors.State state)` Get the list of `WorkflowAction`s associated with the given project `State`.
`void` | `removeApprovers(java.lang.String... approvers)` Removes the given approvers from the approver list for this object.
`void` | `setApprovalMode(Project.ApprovalMode approvalMode)` Set the `ApprovalMode` on this object.
`void` | `setCommentMode(Project.CommentMode commentMode)` Sets the `CommentMode` for this project.
`void` | `setPublishOption(Project.PublishOptions publishOption)` Set the given `PublishOptions` on this object.
`void` | `setWorkflowActionsForState(ProjectStateSelectors.State state, DocumentId... workflowActionDocumentIds)` Set the given `WorkflowAction`s for the specified `State` on this object.

Method Detail

### setPublishOption

    void setPublishOption(Project.PublishOptions publishOption)

  Set the given `PublishOptions` on this object.

  Parameters:
    `publishOption` - the `PublishOptions` to be set.
  Throws:
    `java.lang.IllegalArgumentException` - if the given `PublishOptions` is null.

### getPublishOption

    Project.PublishOptions getPublishOption()

  Get the `PublishOption` set on this object.

  Returns:
    the object's `PublishOptions`

### setApprovalMode

    void setApprovalMode(Project.ApprovalMode approvalMode)

  Set the `ApprovalMode` on this object.

  Parameters:
    `approvalMode` - the `ApprovalMode` to be set.
  Throws:
    `java.lang.IllegalArgumentException` - if the argument is null.
    `java.lang.IllegalStateException` - if invoked on a `Project` and the project's current state is not `ACTIVE`.
  Since:
    8.0

### getApprovalMode

    Project.ApprovalMode getApprovalMode()

  Get the `ApprovalMode` set on this object.

  Returns:
    the object's `ApprovalMode`
  Since:
    8.0

### setCommentMode

    void setCommentMode(Project.CommentMode commentMode)

  Sets the `CommentMode` for this project.

  Parameters:
    `commentMode` - the `CommentMode` to be set on this ptototype.
  Throws:
    `java.lang.IllegalArgumentException` - if the given `CommentMode` is null.
  Since:
    8.0

### getCommentMode

    Project.CommentMode getCommentMode()

  Gets the `CommentMode` set on this project.

  Returns:
    the object's `CommentMode`.
  Since:
    8.0

### addApprovers

    void addApprovers(java.lang.String... approverNames)

  Add the given names as approvers on this object. A name is added only if it can be converted to a valid user or group.

  Parameters:
    `approverNames` - the names of users and/or groups to be set as approvers on this object. These names are either the common names or distinguished names, depending on the setting on the Workspace. See `Workspace.isDistinguishedNamesUsed()`.
  Throws:
    `java.lang.IllegalStateException` - if invoked on a `Project` and the project's current state is not `ACTIVE`.
  Since:
    8.0

### removeApprovers

    void removeApprovers(java.lang.String... approvers)

  Removes the given approvers from the approver list for this object.

  An approver is only removed if it can be converted to a valid member and is already in the list of approvers for this object.

  Note: Each approver is either a user's common name or distinguished name depending on the setting on the `Workspace`. See `Workspace.isDistinguishedNamesUsed()`.

  Parameters:
    `approvers` - the approvers names to remove from this object.
  Throws:
    `java.lang.IllegalStateException` - if invoked on a `Project` and the project's current state is not `ACTIVE`.
  Since:
    8.0

### clearApprovers

    void clearApprovers()

  A convenient method to remove all approvers from the object. This is equivalent to retrieving all approvers then perform `removeApprovers(String...)`

  Throws:
    `java.lang.IllegalStateException` - if invoked on a `Project` and the project's current state is not `ACTIVE`.
  Since:
    8.0

### getCurrentApprovers

    java.lang.String[] getCurrentApprovers()
                                           throws PropertyRetrievalException

  Returns a string array of members who have Approver access to this object. The strings are either the users' common names or distinguished names, depending on the setting on the Workspace. See `Workspace.isDistinguishedNamesUsed()`.

  The resultant array may contain the names of users and groups.

  Returns an empty array if this object does not have Approver access specified.

  Returns:
    a string array of members that have Approver access to this object.
  Throws:
    `PropertyRetrievalException` - if this document is not workflowable, or the current stage is not accessible by this user
  Since:
    8.0

### setWorkflowActionsForState

    void setWorkflowActionsForState(ProjectStateSelectors.State state,
                                    DocumentId... workflowActionDocumentIds)

  Set the given `WorkflowAction`s for the specified `State` on this object. This list will override any existing actions associated with the defined `State`. The given `WorkflowAction`s will be added and executed in the defined order. Duplicate `WorkflowAction`s will be ignored.

  Parameters:
    `state` - the non-null project `State` to set the `WorkflowAction` on. All project `State`s except `ACTIVE` support `WorkflowAction`.
    `workflowActionDocumentIds` - a non-null, non-empty list of `DocumentId` whose type must be assignable to that of a `WorkflowAction`.
  Throws:
    `java.lang.IllegalArgumentException` - if the specified state is null or does not support `WorkflowAction`. or the `DocumentId` array is null or empty, or if no `WorkflowAction` object exists for a given `DocumentId`.
    `java.lang.IllegalStateException` - if invoked on a `Project` and the project's current state is not `ACTIVE`.

### clearWorkflowActionsForState

    void clearWorkflowActionsForState(ProjectStateSelectors.State state)

  A convenient method to clear all `WorkflowAction`s currently associated with the given `State`.

  Parameters:
    `state` - the project `State` to clear all the associated `WorkflowAction` for.
  Throws:
    `java.lang.IllegalArgumentException` - if the specified state is null.
    `java.lang.IllegalStateException` - if the project's current `State` is not `ACTIVE`.

### getWorkflowActionsForState

    DocumentId[] getWorkflowActionsForState(ProjectStateSelectors.State state)

  Get the list of `WorkflowAction`s associated with the given project `State`. If the given project `State` has no `WorkflowAction` associated with it then an empty array will be returned.

  Parameters:
    `state` - the non-null project state to query associated `WorkflowAction`s for.
  Returns:
    the array of `WorkflowAction`s, defined on the given project `State`, or an empty array is there is none.

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