com.plumtree.remote.prc.collaboration.project
Interface IProject


public interface IProject

IProject represents a collaboration project object. A Project is the basic container for all other collaboration objects. The class allows modifications of project metadata and security. Note that all operations modifying the project will not be stored permanently until store method is called.


Method Summary
 java.util.Date getCreatedDate()
          Returns the creation date.
 java.lang.String getDescription()
          Returns the project description.
 java.lang.String getDetailsURL()
          Returns the URL at which the project details can be viewed.
 int getID()
          Returns the project ID.
 java.util.Date getLastModifiedDate()
          Returns the last modified date.
 java.lang.String getName()
          Returns the project name.
 int getOwnerUserID()
          Returns the user ID of the owner of this project.
 IRole getRole(RoleType roleType)
          Returns the role in this project based on the given role type.
 java.util.Date getStartDate()
          Returns the project start date.
 ProjectStatus getStatus()
          Returns the current project status.
 boolean hasCreatedDate()
          Returns true if the created date is available, else false.
 boolean hasLastModifiedDate()
          Returns true if the lastModifiedDate is available, else false.
 boolean hasStartDate()
          Returns true if the start date is available, else false.
 boolean isActionAllowed(ProjectPermission permission)
          Returns true if a given ProjectPermission is allowed for this project.
 void setDescription(java.lang.String description)
          Sets the project description.
 void setName(java.lang.String name)
          Sets the project name.
 void setStartDate(java.util.Date startDate)
          Sets the project start date.
 void setStatus(ProjectStatus status)
          Sets the project status.
 void store()
          Stores a project.
 

Method Detail

getCreatedDate

public java.util.Date getCreatedDate()
Returns the creation date.

Returns:
the creation date.
Throws:
java.lang.IllegalStateException - if the project has not yet been stored or has already been removed

getDescription

public java.lang.String getDescription()
Returns the project description.

Returns:
the project description.
Throws:
java.lang.IllegalStateException - if the project has already been removed.

getDetailsURL

public java.lang.String getDetailsURL()
Returns the URL at which the project details can be viewed.

Note: This URL is gatewayed using the collaboration server's primary portal. Constructs the URL for the project details string.

Returns:
the project details URL.
Throws:
java.lang.IllegalStateException - if the project has not yet been stored or has already been removed.

getID

public int getID()
Returns the project ID.

Returns:
the project ID.
Throws:
java.lang.IllegalStateException - if the project has not yet been stored or has already been removed.

getLastModifiedDate

public java.util.Date getLastModifiedDate()
Returns the last modified date.

Returns:
the last modified date.
Throws:
java.lang.IllegalStateException - if the project has not yet been stored or has already been removed.

getName

public java.lang.String getName()
Returns the project name.

Returns:
the project name.
Throws:
java.lang.IllegalStateException - if the project has already been removed.

getOwnerUserID

public int getOwnerUserID()
Returns the user ID of the owner of this project. The owner of a project is the user who creates this project.

Returns:
the the owner ID.
Throws:
java.lang.IllegalStateException - if the project has already been removed.

getRole

public IRole getRole(RoleType roleType)
              throws CollaborationException
Returns the role in this project based on the given role type.

Parameters:
roleType - type of role, cannot be null.
Returns:
the role given a role type.
Throws:
java.lang.IllegalStateException - if the project has not yet been stored or has already been removed.
CollaborationException

getStartDate

public java.util.Date getStartDate()
Returns the project start date.

Returns:
project start date.
Throws:
java.lang.IllegalStateException - if the project has already been removed, or an attempt is made to get the property value prior to it being set.

getStatus

public ProjectStatus getStatus()
Returns the current project status.

Returns:
ProjectStatus that indicates the current project status.
Throws:
java.lang.IllegalStateException - if the project has already been removed.

hasCreatedDate

public boolean hasCreatedDate()
Returns true if the created date is available, else false.

Returns:
true if the createdDate is available, else false.
Throws:
java.lang.IllegalStateException - if the project has already been removed.

hasLastModifiedDate

public boolean hasLastModifiedDate()
Returns true if the lastModifiedDate is available, else false.

Returns:
true if the lastModifiedDate is available, else false.
Throws:
java.lang.IllegalStateException - if the project has already been removed.

hasStartDate

public boolean hasStartDate()
Returns true if the start date is available, else false.

Returns:
true if the start date is available, else false.
Throws:
java.lang.IllegalStateException - if the project has already been removed.

isActionAllowed

public boolean isActionAllowed(ProjectPermission permission)
                        throws CollaborationException,
                               java.rmi.RemoteException
Returns true if a given ProjectPermission is allowed for this project. This method can be used to determine if a user can perform a given action within the context of a project such as editing a project, copying a project, editing project security, etc. See the enumeration type ProjectPermission for details about specific project permissions.

Parameters:
permission - project permission, cannot be null.
Returns:
true if the user can perform the given action, else false.
Throws:
java.lang.IllegalStateException - if the project has not yet been stored or has already been removed.
CollaborationException - if the method call resulted in an error.
java.rmi.RemoteException - if there is a communication problem during the execution of the remote method call.

setDescription

public void setDescription(java.lang.String description)
Sets the project description.

Parameters:
description - the description.
Throws:
java.lang.IllegalStateException - if the project has already been removed.

setName

public void setName(java.lang.String name)
Sets the project name.

Parameters:
name - the project name.
Throws:
java.lang.IllegalStateException - if the project has already been removed.

setStartDate

public void setStartDate(java.util.Date startDate)
Sets the project start date. Note that the value of the date stored in the database may vary by a few milliseconds from the supplied date. The date in this project will reflect the stored date after a call to store.

Parameters:
startDate - the start date of the project.
Throws:
java.lang.IllegalStateException - if the project has already been removed.

setStatus

public void setStatus(ProjectStatus status)
Sets the project status.

Parameters:
status - of the project.
Throws:
java.lang.IllegalStateException - if the project has already been removed.

store

public void store()
           throws CollaborationException,
                  java.rmi.RemoteException
Stores a project. Can be used to persist a newly created project, or edit an existing project.

Throws:
java.lang.IllegalStateException - if the project has already been removed.
CollaborationException - if the method call resulted in an error.
java.rmi.RemoteException - if there is a communication problem during the execution of the remote method call.


For additional information on the IDK, including tutorials, blogs, code samples and more,see the AquaLogic User Interaction Developer Center on BEA dev2dev.

Copyright ©2007 BEA Systems, Inc. All Rights Reserved.