|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectwt.clients.util.PersistableItem
wt.clients.project.CRoleHolder
wt.clients.project.CProject
A client wrapper class to handle Projects. This class represents an existing Project object by holding the Project object and/or a ProjectReference object. Both the Project object and the ProjectReference object always represent a single project. This class should be used by client applications rather than using the wt.project.Project class directly.
Field Summary | |
protected ProjectReference |
projectRef
The ProjectReference associated with this CProject instance |
private static String |
RBNAME
Resource bundle name for localizing button, label and message text |
private boolean |
renameProject
|
private String |
renameProjectName
|
Fields inherited from class wt.clients.project.CRoleHolder |
roleHolder |
Fields inherited from class wt.clients.util.PersistableItem |
|
Constructor Summary | |
CProject()
Class constructor taking no arguments. |
|
CProject(Project project)
Class constructor taking Project. |
|
CProject(ProjectReference projectReference)
Class constructor taking ProjectReference. |
Method Summary | |
protected boolean |
checkModifyPermission()
Determine if the user has modify permission on the project. |
protected ProjectReference |
deriveProjectRef()
Populate the projectRef class variable and return it. |
protected void |
deriveRoleHolder()
Populate the roleHolder class variable if it is not already populated. |
(package private) String |
getDescription()
Get the project description. |
protected String |
getIdentity()
Get the project identity. |
(package private) String |
getName()
Get the project name. |
protected String |
getProjectLocation()
Get the project folder location. |
RoleHolder |
getProjectObject()
Get the project object. |
ProjectReference |
getProjectRef()
Get the projectRef object. |
(package private) boolean |
isEnabled()
Get the project enabled status |
protected boolean |
objectIDequals(ProjectReference projectReference)
Determine if the project ProjectReference is equal to the passed ProjectReference. |
void |
refresh()
Refresh the project from the database. |
(package private) void |
refreshCProject()
Refresh the project by obtaining it from the database. |
(package private) void |
saveCProject()
Persist the project to the database. |
void |
setCProjectIdentity(String name)
Set the project identity. |
void |
setDescription(String description)
Set the project description. |
void |
setEnabled(boolean enabled)
Set the enabled flag. |
void |
setProjectLocation(String folder)
Set the project folder location. |
void |
setProjectObject(RoleHolder value)
Set the project object. |
Methods inherited from class wt.clients.project.CRoleHolder |
addPrincipal, containsRole, deletePrincipal, deleteRole, getPrincipals, getRoleHolder, getRoleList, getRoles |
Methods inherited from class wt.clients.util.PersistableItem |
isCreated, isModified, save, setCreated, setModified |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private static String RBNAME
protected ProjectReference projectRef
private boolean renameProject
private String renameProjectName
Constructor Detail |
public CProject() throws WTException
public CProject(Project project) throws WTException
project
- Previously created Project which this CProject representspublic CProject(ProjectReference projectReference)
Method Detail |
public void refresh() throws WTException
refresh
in class PersistableItem
WTException
- if the refresh failsString getName() throws WTException
WTException
boolean isEnabled() throws WTException
WTException
String getDescription() throws WTException
WTException
public void setDescription(String description) throws WTException, PropertyVetoException
description
- Description text.
WTException
PropertyVetoException
public void setEnabled(boolean enabled) throws WTException, PropertyVetoException
enabled
- Enabled flag.
WTException
PropertyVetoException
public void setProjectLocation(String folder) throws WTException
folder
- Folder in which this project is to reside.
WTException
protected String getProjectLocation() throws WTException
WTException
public void setCProjectIdentity(String name) throws PropertyVetoException, WTException
name
- The project name.
WTException
PropertyVetoException
void saveCProject() throws WTException
WTException
void refreshCProject() throws WTException
WTException
protected boolean checkModifyPermission() throws WTException
WTException
protected boolean objectIDequals(ProjectReference projectReference) throws WTException
projectReference
- A ProjectReference.
WTException
protected String getIdentity() throws WTException
WTException
protected void deriveRoleHolder() throws WTException
WTException
- If both the roleHolder and projectRef class variables are
nullprotected ProjectReference deriveProjectRef() throws WTException
WTException
- If both the roleHolder and projectRef class variables are
nullpublic RoleHolder getProjectObject() throws WTException
WTException
public ProjectReference getProjectRef() throws WTException
WTException
public void setProjectObject(RoleHolder value) throws WTException
WTException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |