com.trackstudio.secured
Class SecuredTaskBean

java.lang.Object
  extended by com.trackstudio.tools.PropertyComparable
      extended by com.trackstudio.secured.Secured
          extended by com.trackstudio.secured.AbstractBeanWithUdf
              extended by com.trackstudio.secured.SecuredTaskBean
All Implemented Interfaces:
SecuredTaskBeanInterface, java.lang.Comparable
Direct Known Subclasses:
SecuredTaskBean4Filter, SecuredTaskTriggerBean

public class SecuredTaskBean
extends AbstractBeanWithUdf
implements SecuredTaskBeanInterface

Bean which represents task


Field Summary
protected  java.lang.Long actualBudget
           
protected  boolean allowedByACL
           
protected  java.lang.Integer allowedChildrenCount
           
protected  java.lang.Long budget
           
protected  java.util.Calendar closedate
           
protected  java.util.Calendar deadline
           
protected  java.lang.String description
           
protected  java.util.ArrayList<SecuredUDFValueBean> filteredUdfValues
           
protected  boolean onSight
           
protected  java.util.Calendar submitdate
           
protected  java.lang.Integer totalChildrenCount
           
protected  java.util.Calendar updatedate
           
 
Fields inherited from class com.trackstudio.secured.Secured
sc
 
Fields inherited from class com.trackstudio.tools.PropertyComparable
container
 
Constructor Summary
  SecuredTaskBean()
           
  SecuredTaskBean(java.lang.String taskId, SessionContext sec)
           
  SecuredTaskBean(TaskRelatedInfo task, SessionContext sec)
           
protected SecuredTaskBean(TaskRelatedInfo task, SessionContext sec, boolean hasAccess)
           
 
Method Summary
 boolean canDelete()
           
 boolean canManage()
          Проверяет доступ к бину.
 boolean canView()
           
 boolean canViewChildren()
           
 boolean equals(java.lang.Object o)
          Сравнивает два обхекта текущего класса
 java.lang.Long getAbudget()
           
 java.lang.String getAbudgetToString()
           
 java.lang.Long getActualBudget()
           
 java.lang.String getActualBudgetAsString()
           
 java.util.HashMap<java.lang.String,SecuredUDFValueBean> getAliasUdfValues()
          Method need for jsp
 java.lang.Integer getAllowedChildrenCount()
           
 java.util.Map<java.lang.String,java.lang.Boolean> getAllowedChildrenMap()
           
 java.util.Map<java.lang.String,java.lang.Boolean> getAllowedChildrenWithSubtasksMap()
           
 java.util.ArrayList<SecuredTaskBean> getAncestors()
           
 java.util.ArrayList<SecuredTaskAttachmentBean> getAttachments()
           
 java.util.List<SecuredTaskAttachmentBean> getAttachs()
           
 java.util.Map<SecuredTaskAttachmentBean,java.lang.Boolean> getAttachsTaskOrMessage()
           
 java.lang.Long getBudget()
           
 java.lang.String getBudgetAsString()
           
 java.lang.String getBudgetFormat()
           
 boolean getCanDelete()
           
protected  java.lang.Boolean getCanViewChildren()
           
 SecuredCategoryBean getCategory()
           
 java.lang.String getCategoryId()
           
 java.util.ArrayList<SecuredTaskBean> getChildren()
           
 java.lang.Integer getChildrenCount()
           
 java.util.Calendar getClosedate()
           
 java.lang.String getClosedateAsString()
           
protected  PropertyContainer getContainer()
          Возвращает контейнер свойств
 java.util.Calendar getDeadline()
           
 java.lang.String getDeadlineAsString()
           
 java.lang.String getDescription()
           
 java.lang.String getEncodeDescription()
          Deprecated.  
 java.lang.String getEncodeShortname()
          Deprecated.  
 java.lang.String getEncodeShortnameInput()
          Deprecated.  
protected  java.util.ArrayList getFilteredUdfValues()
           
 java.util.ArrayList<SecuredUDFValueBean> getFilteredUDFValues()
           
 java.util.ArrayList<SecuredUDFBean> getFilterUDFs()
           
 java.util.ArrayList<SecuredUDFValueBean> getFilterUDFValues()
           
 SecuredUserBean getHandler()
           
 SecuredPrstatusBean getHandlerGroup()
           
 java.lang.String getHandlerGroupId()
           
 java.lang.String getHandlerId()
           
 java.util.List<java.lang.String> getHandlerPrstatuses()
           
 java.util.Collection<java.lang.String> getHandlerPrstatusesId()
           
 SecuredUserBean getHandlerUser()
           
 java.lang.String getHandlerUserId()
           
 java.lang.String getId()
           
 java.lang.Integer getMessageCount()
           
 java.util.ArrayList<SecuredMessageBean> getMessages()
           
 java.util.ArrayList<java.lang.String> getMessagesIds()
           
 java.lang.String getName()
           
 java.lang.String getNumber()
           
 SecuredTaskBean getParent()
           
 java.lang.String getParentId()
           
 SecuredPriorityBean getPriority()
           
 java.lang.String getPriorityId()
           
 java.lang.String getProjectAlias()
           
 java.util.List<SecuredTaskBean> getProjectChildrenNotFinal(SessionContext sc, java.lang.String taskId)
           
 SecuredResolutionBean getResolution()
           
 java.lang.String getResolutionId()
           
 TaskJSONBean getRest()
           
 java.lang.String getShortname()
           
 TaskBean getSOAP()
           
 SecuredStatusBean getStatus()
           
 java.lang.String getStatusId()
           
 java.util.Calendar getSubmitdate()
           
 java.lang.String getSubmitdateAsString()
           
 SecuredUserBean getSubmitter()
           
 java.lang.String getSubmitterId()
           
 java.util.List<java.lang.String> getSubmitterPrstatuses()
           
 java.util.Collection<java.lang.String> getSubmitterPrstatusesId()
           
protected  TaskRelatedInfo getTask()
           
 java.lang.String getTaskNameCutted()
           
 java.lang.String getTaskNumber()
           
 java.lang.String getTextDescription()
           
 java.lang.Integer getTotalChildrenCount()
           
 java.util.ArrayList<SecuredUDFBean> getUDFs()
           
 java.util.ArrayList<SecuredUDFBean> getUDFs(java.lang.String workflowId)
           
 java.util.HashMap<java.lang.String,SecuredUDFValueBean> getUDFValues()
           
 java.util.ArrayList<SecuredUDFValueBean> getUDFValuesForNewTask(java.lang.String workflowId)
           
 java.util.ArrayList<SecuredUDFValueBean> getUdfValuesList()
           
 java.util.ArrayList<SecuredUDFValueBean> getUDFValuesList()
           
 java.util.Calendar getUpdatedate()
           
 java.lang.String getUpdatedateAsString()
           
 SecuredWorkflowBean getWorkflow()
           
 java.lang.String getWorkflowId()
           
protected  java.util.ArrayList<SecuredUDFValueBean> getWorkflowUdfValues()
           
 java.util.ArrayList<SecuredUDFValueBean> getWorkflowUDFValues()
           
 boolean hasAttachments()
           
 int hashCode()
          Возвращает hash code
 boolean isAllowedByACL()
           
 boolean isOnSight()
           
 boolean isOverdue()
           
 java.lang.String toString()
           
 
Methods inherited from class com.trackstudio.secured.Secured
canUpdate, getCanManage, getCanUpdate, getSecure
 
Methods inherited from class com.trackstudio.tools.PropertyComparable
compareTo, compareToIgnoreCase, compareToIgnoreCase
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.trackstudio.secured.SecuredTaskBeanInterface
compareTo
 

Field Detail

allowedByACL

protected boolean allowedByACL

onSight

protected boolean onSight

submitdate

protected java.util.Calendar submitdate

updatedate

protected java.util.Calendar updatedate

closedate

protected java.util.Calendar closedate

description

protected java.lang.String description

budget

protected java.lang.Long budget

actualBudget

protected java.lang.Long actualBudget

deadline

protected java.util.Calendar deadline

totalChildrenCount

protected java.lang.Integer totalChildrenCount

allowedChildrenCount

protected java.lang.Integer allowedChildrenCount

filteredUdfValues

protected java.util.ArrayList<SecuredUDFValueBean> filteredUdfValues
Constructor Detail

SecuredTaskBean

public SecuredTaskBean()

SecuredTaskBean

public SecuredTaskBean(TaskRelatedInfo task,
                       SessionContext sec)
                throws GranException
Throws:
GranException

SecuredTaskBean

protected SecuredTaskBean(TaskRelatedInfo task,
                          SessionContext sec,
                          boolean hasAccess)

SecuredTaskBean

public SecuredTaskBean(java.lang.String taskId,
                       SessionContext sec)
                throws GranException
Throws:
GranException
Method Detail

getCategory

public SecuredCategoryBean getCategory()
                                throws GranException
Specified by:
getCategory in interface SecuredTaskBeanInterface
Throws:
GranException

getStatus

public SecuredStatusBean getStatus()
                            throws GranException
Specified by:
getStatus in interface SecuredTaskBeanInterface
Throws:
GranException

getResolution

public SecuredResolutionBean getResolution()
                                    throws GranException
Specified by:
getResolution in interface SecuredTaskBeanInterface
Throws:
GranException

getPriority

public SecuredPriorityBean getPriority()
                                throws GranException
Specified by:
getPriority in interface SecuredTaskBeanInterface
Throws:
GranException

getSubmitter

public SecuredUserBean getSubmitter()
                             throws GranException
Specified by:
getSubmitter in interface SecuredTaskBeanInterface
Throws:
GranException

getHandlerUser

public SecuredUserBean getHandlerUser()
                               throws GranException
Specified by:
getHandlerUser in interface SecuredTaskBeanInterface
Throws:
GranException

getHandlerGroup

public SecuredPrstatusBean getHandlerGroup()
                                    throws GranException
Specified by:
getHandlerGroup in interface SecuredTaskBeanInterface
Throws:
GranException

getParent

public SecuredTaskBean getParent()
                          throws GranException
Specified by:
getParent in interface SecuredTaskBeanInterface
Throws:
GranException

getWorkflow

public SecuredWorkflowBean getWorkflow()
                                throws GranException
Specified by:
getWorkflow in interface SecuredTaskBeanInterface
Throws:
GranException

getId

public java.lang.String getId()
Specified by:
getId in interface SecuredTaskBeanInterface
Specified by:
getId in class Secured

getName

public java.lang.String getName()
Specified by:
getName in interface SecuredTaskBeanInterface

getShortname

public java.lang.String getShortname()
Specified by:
getShortname in interface SecuredTaskBeanInterface

getEncodeShortname

public java.lang.String getEncodeShortname()
Deprecated. 

Returns:
Encoded shortname

getEncodeShortnameInput

public java.lang.String getEncodeShortnameInput()
Deprecated. 

Returns:
Encoded short name

getEncodeDescription

public java.lang.String getEncodeDescription()
                                      throws GranException
Deprecated. 

Returns:
Encoded description
Throws:
GranException - при небходимости

getSubmitdate

public java.util.Calendar getSubmitdate()
                                 throws GranException
Specified by:
getSubmitdate in interface SecuredTaskBeanInterface
Throws:
GranException

getSubmitdateAsString

public java.lang.String getSubmitdateAsString()
                                       throws GranException
Throws:
GranException

getUpdatedate

public java.util.Calendar getUpdatedate()
                                 throws GranException
Specified by:
getUpdatedate in interface SecuredTaskBeanInterface
Throws:
GranException

getUpdatedateAsString

public java.lang.String getUpdatedateAsString()
                                       throws GranException
Throws:
GranException

getClosedate

public java.util.Calendar getClosedate()
                                throws GranException
Specified by:
getClosedate in interface SecuredTaskBeanInterface
Throws:
GranException

getClosedateAsString

public java.lang.String getClosedateAsString()
                                      throws GranException
Throws:
GranException

getDescription

public java.lang.String getDescription()
                                throws GranException
Specified by:
getDescription in interface SecuredTaskBeanInterface
Throws:
GranException

getTextDescription

public java.lang.String getTextDescription()
                                    throws GranException
Specified by:
getTextDescription in interface SecuredTaskBeanInterface
Throws:
GranException

getBudget

public java.lang.Long getBudget()
                         throws GranException
Specified by:
getBudget in interface SecuredTaskBeanInterface
Throws:
GranException

getActualBudget

public java.lang.Long getActualBudget()
                               throws GranException
Specified by:
getActualBudget in interface SecuredTaskBeanInterface
Throws:
GranException

getDeadline

public java.util.Calendar getDeadline()
                               throws GranException
Specified by:
getDeadline in interface SecuredTaskBeanInterface
Throws:
GranException

getDeadlineAsString

public java.lang.String getDeadlineAsString()
                                     throws GranException
Throws:
GranException

getNumber

public java.lang.String getNumber()
Specified by:
getNumber in interface SecuredTaskBeanInterface

getContainer

protected PropertyContainer getContainer()
Description copied from class: PropertyComparable
Возвращает контейнер свойств

Specified by:
getContainer in class PropertyComparable
Returns:
контейнер свойств

getMessageCount

public java.lang.Integer getMessageCount()
                                  throws GranException
Specified by:
getMessageCount in interface SecuredTaskBeanInterface
Throws:
GranException

getChildrenCount

public java.lang.Integer getChildrenCount()
                                   throws GranException
Specified by:
getChildrenCount in interface SecuredTaskBeanInterface
Throws:
GranException

canViewChildren

public boolean canViewChildren()
                        throws GranException
Throws:
GranException

getChildren

public java.util.ArrayList<SecuredTaskBean> getChildren()
                                                 throws GranException
Specified by:
getChildren in interface SecuredTaskBeanInterface
Throws:
GranException

getMessages

public java.util.ArrayList<SecuredMessageBean> getMessages()
                                                    throws GranException
Specified by:
getMessages in interface SecuredTaskBeanInterface
Throws:
GranException

getMessagesIds

public java.util.ArrayList<java.lang.String> getMessagesIds()
                                                     throws GranException
Throws:
GranException

getTotalChildrenCount

public java.lang.Integer getTotalChildrenCount()
                                        throws GranException
Specified by:
getTotalChildrenCount in interface SecuredTaskBeanInterface
Throws:
GranException

getAllowedChildrenCount

public java.lang.Integer getAllowedChildrenCount()
                                          throws GranException
Specified by:
getAllowedChildrenCount in interface SecuredTaskBeanInterface
Throws:
GranException

getTaskNumber

public java.lang.String getTaskNumber()
Specified by:
getTaskNumber in interface SecuredTaskBeanInterface

getUDFValuesForNewTask

public java.util.ArrayList<SecuredUDFValueBean> getUDFValuesForNewTask(java.lang.String workflowId)
                                                                throws GranException
Specified by:
getUDFValuesForNewTask in interface SecuredTaskBeanInterface
Throws:
GranException

getUDFValues

public java.util.HashMap<java.lang.String,SecuredUDFValueBean> getUDFValues()
                                                                     throws GranException
Specified by:
getUDFValues in interface SecuredTaskBeanInterface
Specified by:
getUDFValues in class AbstractBeanWithUdf
Throws:
GranException

getAliasUdfValues

public java.util.HashMap<java.lang.String,SecuredUDFValueBean> getAliasUdfValues()
                                                                          throws GranException
Method need for jsp

Returns:
map udfId, value
Throws:
GranException - for need

getUDFValuesList

public java.util.ArrayList<SecuredUDFValueBean> getUDFValuesList()
                                                          throws GranException
Specified by:
getUDFValuesList in interface SecuredTaskBeanInterface
Specified by:
getUDFValuesList in class AbstractBeanWithUdf
Throws:
GranException

getUdfValuesList

public java.util.ArrayList<SecuredUDFValueBean> getUdfValuesList()
                                                          throws GranException
Throws:
GranException

getFilterUDFs

public java.util.ArrayList<SecuredUDFBean> getFilterUDFs()
                                                  throws GranException
Throws:
GranException

getFilteredUDFValues

public java.util.ArrayList<SecuredUDFValueBean> getFilteredUDFValues()
                                                              throws GranException
Specified by:
getFilteredUDFValues in interface SecuredTaskBeanInterface
Specified by:
getFilteredUDFValues in class AbstractBeanWithUdf
Throws:
GranException

getWorkflowUDFValues

public java.util.ArrayList<SecuredUDFValueBean> getWorkflowUDFValues()
                                                              throws GranException
Specified by:
getWorkflowUDFValues in interface SecuredTaskBeanInterface
Throws:
GranException

getUDFs

public java.util.ArrayList<SecuredUDFBean> getUDFs()
                                            throws GranException
Specified by:
getUDFs in interface SecuredTaskBeanInterface
Throws:
GranException

getUDFs

public java.util.ArrayList<SecuredUDFBean> getUDFs(java.lang.String workflowId)
                                            throws GranException
Specified by:
getUDFs in interface SecuredTaskBeanInterface
Throws:
GranException

canDelete

public boolean canDelete()
                  throws GranException
Throws:
GranException

getCanDelete

public boolean getCanDelete()
                     throws GranException
Throws:
GranException

getFilterUDFValues

public java.util.ArrayList<SecuredUDFValueBean> getFilterUDFValues()
                                                            throws GranException
Specified by:
getFilterUDFValues in interface SecuredTaskBeanInterface
Throws:
GranException

getTaskNameCutted

public java.lang.String getTaskNameCutted()
Specified by:
getTaskNameCutted in interface SecuredTaskBeanInterface

getProjectAlias

public java.lang.String getProjectAlias()
                                 throws GranException
Specified by:
getProjectAlias in interface SecuredTaskBeanInterface
Throws:
GranException

getAttachments

public java.util.ArrayList<SecuredTaskAttachmentBean> getAttachments()
                                                              throws GranException
Specified by:
getAttachments in interface SecuredTaskBeanInterface
Throws:
GranException

getAttachs

public java.util.List<SecuredTaskAttachmentBean> getAttachs()
                                                     throws GranException
Throws:
GranException

getAttachsTaskOrMessage

public java.util.Map<SecuredTaskAttachmentBean,java.lang.Boolean> getAttachsTaskOrMessage()
                                                                                   throws GranException
Throws:
GranException

hasAttachments

public boolean hasAttachments()
                       throws GranException
Specified by:
hasAttachments in interface SecuredTaskBeanInterface
Throws:
GranException

getHandlerPrstatuses

public java.util.List<java.lang.String> getHandlerPrstatuses()
                                                      throws GranException
Specified by:
getHandlerPrstatuses in interface SecuredTaskBeanInterface
Throws:
GranException

getSubmitterPrstatuses

public java.util.List<java.lang.String> getSubmitterPrstatuses()
                                                        throws GranException
Specified by:
getSubmitterPrstatuses in interface SecuredTaskBeanInterface
Throws:
GranException

hashCode

public int hashCode()
Description copied from class: PropertyComparable
Возвращает hash code

Overrides:
hashCode in class PropertyComparable
Returns:
hashCode

canView

public boolean canView()
                throws GranException
Specified by:
canView in class Secured
Throws:
GranException

canManage

public boolean canManage()
                  throws GranException
Description copied from class: Secured
Проверяет доступ к бину. Новый улучшеный метод. Нужно проверять доступ как по ACL, так и по Roles

Specified by:
canManage in class Secured
Returns:
TRUE - доступ есть, FALSE - нет
Throws:
GranException - при необходимости

getSOAP

public TaskBean getSOAP()
                 throws GranException
Throws:
GranException

getRest

public TaskJSONBean getRest()
                     throws GranException
Throws:
GranException

getCategoryId

public java.lang.String getCategoryId()
Specified by:
getCategoryId in interface SecuredTaskBeanInterface

getStatusId

public java.lang.String getStatusId()
Specified by:
getStatusId in interface SecuredTaskBeanInterface

getResolutionId

public java.lang.String getResolutionId()
                                 throws GranException
Specified by:
getResolutionId in interface SecuredTaskBeanInterface
Throws:
GranException

getPriorityId

public java.lang.String getPriorityId()
                               throws GranException
Specified by:
getPriorityId in interface SecuredTaskBeanInterface
Throws:
GranException

getSubmitterId

public java.lang.String getSubmitterId()
Specified by:
getSubmitterId in interface SecuredTaskBeanInterface

getHandlerUserId

public java.lang.String getHandlerUserId()
Specified by:
getHandlerUserId in interface SecuredTaskBeanInterface

getHandlerGroupId

public java.lang.String getHandlerGroupId()
Specified by:
getHandlerGroupId in interface SecuredTaskBeanInterface

getHandlerPrstatusesId

public java.util.Collection<java.lang.String> getHandlerPrstatusesId()
                                                              throws GranException
Specified by:
getHandlerPrstatusesId in interface SecuredTaskBeanInterface
Throws:
GranException

getSubmitterPrstatusesId

public java.util.Collection<java.lang.String> getSubmitterPrstatusesId()
                                                                throws GranException
Specified by:
getSubmitterPrstatusesId in interface SecuredTaskBeanInterface
Throws:
GranException

getParentId

public java.lang.String getParentId()
Specified by:
getParentId in interface SecuredTaskBeanInterface

getWorkflowId

public java.lang.String getWorkflowId()
Specified by:
getWorkflowId in interface SecuredTaskBeanInterface

isOnSight

public boolean isOnSight()
Specified by:
isOnSight in interface SecuredTaskBeanInterface

getAllowedChildrenMap

public java.util.Map<java.lang.String,java.lang.Boolean> getAllowedChildrenMap()
                                                                        throws GranException
Specified by:
getAllowedChildrenMap in interface SecuredTaskBeanInterface
Throws:
GranException

getAllowedChildrenWithSubtasksMap

public java.util.Map<java.lang.String,java.lang.Boolean> getAllowedChildrenWithSubtasksMap()
                                                                                    throws GranException
Specified by:
getAllowedChildrenWithSubtasksMap in interface SecuredTaskBeanInterface
Throws:
GranException

getHandler

public SecuredUserBean getHandler()
                           throws GranException
Specified by:
getHandler in interface SecuredTaskBeanInterface
Throws:
GranException

getHandlerId

public java.lang.String getHandlerId()
                              throws GranException
Specified by:
getHandlerId in interface SecuredTaskBeanInterface
Throws:
GranException

getTask

protected TaskRelatedInfo getTask()

isAllowedByACL

public boolean isAllowedByACL()
Specified by:
isAllowedByACL in class Secured

getCanViewChildren

protected java.lang.Boolean getCanViewChildren()

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

getFilteredUdfValues

protected java.util.ArrayList getFilteredUdfValues()

getWorkflowUdfValues

protected java.util.ArrayList<SecuredUDFValueBean> getWorkflowUdfValues()

equals

public boolean equals(java.lang.Object o)
Description copied from class: PropertyComparable
Сравнивает два обхекта текущего класса

Overrides:
equals in class PropertyComparable
Parameters:
o - Скравниваемый обхект
Returns:
TREU если равны, FALSE если нет

getBudgetFormat

public java.lang.String getBudgetFormat()
                                 throws GranException
Throws:
GranException

getAncestors

public java.util.ArrayList<SecuredTaskBean> getAncestors()
                                                  throws GranException
Throws:
GranException

isOverdue

public boolean isOverdue()
                  throws GranException
Throws:
GranException

getBudgetAsString

public java.lang.String getBudgetAsString()
                                   throws GranException
Throws:
GranException

getActualBudgetAsString

public java.lang.String getActualBudgetAsString()
                                         throws GranException
Throws:
GranException

getProjectChildrenNotFinal

public java.util.List<SecuredTaskBean> getProjectChildrenNotFinal(SessionContext sc,
                                                                  java.lang.String taskId)

getAbudget

public java.lang.Long getAbudget()
                          throws GranException
Throws:
GranException

getAbudgetToString

public java.lang.String getAbudgetToString()
                                    throws GranException
Throws:
GranException


Copyright © 2002-2009 TrackStudio, Ltd. All Rights Reserved.