com.trackstudio.secured
Class SecuredMessageBean

java.lang.Object
  extended by com.trackstudio.tools.PropertyComparable
      extended by com.trackstudio.secured.Secured
          extended by com.trackstudio.secured.SecuredMessageBean
All Implemented Interfaces:
java.lang.Comparable
Direct Known Subclasses:
SecuredMessageTriggerBean

public class SecuredMessageBean
extends Secured

Bean which represents message


Field Summary
protected  boolean allowedByACL
           
 
Fields inherited from class com.trackstudio.secured.Secured
sc
 
Fields inherited from class com.trackstudio.tools.PropertyComparable
container
 
Constructor Summary
protected SecuredMessageBean()
           
  SecuredMessageBean(MessageCacheItem message, SessionContext secure)
           
  SecuredMessageBean(java.lang.String message, SessionContext secure)
           
 
Method Summary
 boolean canManage()
          Проверяет доступ к бину.
 boolean canView()
           
 int compareTo(java.lang.Object it)
          Сравнивает два объекта текущего класса
 java.lang.String getActualBudgetAsString()
           
 java.util.ArrayList<SecuredMessageAttachmentBean> getAttachments()
           
 java.lang.Long getBudget()
           
 java.lang.String getBudgetAsString()
           
protected  PropertyContainer getContainer()
          Возвращает контейнер свойств
 java.util.Calendar getDeadline()
           
 java.lang.String getDeadlineAsString()
           
 java.lang.String getDescription()
           
 SecuredUserBean getHandler()
           
 SecuredPrstatusBean getHandlerGroup()
           
 java.lang.String getHandlerGroupId()
           
 java.lang.String getHandlerId()
           
 SecuredUserBean getHandlerUser()
           
 java.lang.String getHandlerUserId()
           
 java.lang.Long getHrs()
           
 java.lang.String getId()
           
 MessageCacheItem getMessage()
           
 SecuredMstatusBean getMstatus()
           
 java.lang.String getMstatusId()
           
 SecuredPriorityBean getPriority()
           
 java.lang.String getPriorityId()
           
 SecuredResolutionBean getResolution()
           
 java.lang.String getResolutionId()
           
 MessageJSONBean getRest()
           
 MessageBean getSOAP()
           
 SecuredUserBean getSubmitter()
           
 java.lang.String getSubmitterId()
           
 SecuredTaskBean getTask()
           
 java.lang.String getTaskId()
           
 java.lang.String getTextDescription()
           
 java.util.Calendar getTime()
           
 java.lang.String getTimeAsString()
           
 boolean isAllowedByACL()
           
 boolean isTestEmpty()
           
 java.lang.String toString()
           
 
Methods inherited from class com.trackstudio.secured.Secured
canUpdate, getCanManage, getCanUpdate, getSecure
 
Methods inherited from class com.trackstudio.tools.PropertyComparable
compareToIgnoreCase, compareToIgnoreCase, equals, hashCode
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

allowedByACL

protected boolean allowedByACL
Constructor Detail

SecuredMessageBean

protected SecuredMessageBean()

SecuredMessageBean

public SecuredMessageBean(MessageCacheItem message,
                          SessionContext secure)
                   throws GranException
Throws:
GranException

SecuredMessageBean

public SecuredMessageBean(java.lang.String message,
                          SessionContext secure)
                   throws GranException
Throws:
GranException
Method Detail

getMessage

public MessageCacheItem getMessage()

getAttachments

public java.util.ArrayList<SecuredMessageAttachmentBean> getAttachments()
                                                                 throws GranException
Throws:
GranException

getId

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

getDescription

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

getTextDescription

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

getTime

public java.util.Calendar getTime()

getTimeAsString

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

getHrs

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

getDeadline

public java.util.Calendar getDeadline()
                               throws GranException
Throws:
GranException

getDeadlineAsString

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

getBudget

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

compareTo

public int compareTo(java.lang.Object it)
Description copied from class: PropertyComparable
Сравнивает два объекта текущего класса

Specified by:
compareTo in interface java.lang.Comparable
Overrides:
compareTo in class PropertyComparable
Parameters:
it - Сравниваемый обхект
Returns:
+1, 0 или -1

getContainer

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

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

getMstatus

public SecuredMstatusBean getMstatus()
                              throws GranException
Throws:
GranException

getHandlerUser

public SecuredUserBean getHandlerUser()
                               throws GranException
Throws:
GranException

getHandlerGroup

public SecuredPrstatusBean getHandlerGroup()
                                    throws GranException
Throws:
GranException

getPriority

public SecuredPriorityBean getPriority()
                                throws GranException
Throws:
GranException

getResolution

public SecuredResolutionBean getResolution()
                                    throws GranException
Throws:
GranException

isAllowedByACL

public boolean isAllowedByACL()
                       throws GranException
Specified by:
isAllowedByACL 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 - при необходимости

getTask

public SecuredTaskBean getTask()
                        throws GranException
Throws:
GranException

getSubmitter

public SecuredUserBean getSubmitter()
                             throws GranException
Throws:
GranException

canView

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

getSOAP

public MessageBean getSOAP()
                    throws GranException
Throws:
GranException

toString

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

getTaskId

public java.lang.String getTaskId()

getSubmitterId

public java.lang.String getSubmitterId()

getResolutionId

public java.lang.String getResolutionId()

getPriorityId

public java.lang.String getPriorityId()

getHandlerUserId

public java.lang.String getHandlerUserId()

getHandlerGroupId

public java.lang.String getHandlerGroupId()

getMstatusId

public java.lang.String getMstatusId()

getHandler

public SecuredUserBean getHandler()
                           throws GranException
Throws:
GranException

getHandlerId

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

getBudgetAsString

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

getActualBudgetAsString

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

isTestEmpty

public boolean isTestEmpty()
                    throws GranException
Throws:
GranException

getRest

public MessageJSONBean getRest()
                        throws GranException
Throws:
GranException


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