com.trackstudio.app.session
Class SessionContext

java.lang.Object
  extended by com.trackstudio.app.session.SessionContext
All Implemented Interfaces:
SessionContextInterface, java.io.Serializable

public class SessionContext
extends java.lang.Object
implements java.io.Serializable, SessionContextInterface

See Also:
Serialized Form

Field Summary
 int progress
           
protected  ProgressManager progressManager
           
 
Method Summary
 boolean allowedByACL(java.lang.String taskid)
          ��� ���������� �����, �������� ��� ��� ������������� ����� TrackStudio �� �����.
 boolean allowedByUser(java.lang.String userid)
          test that current user can view data that own userid
 boolean canAction(TaskAction action, java.lang.String taskid)
           
 boolean canAction(TaskAction action, java.lang.String taskid, java.util.TreeSet list)
           
 boolean canAction(UserAction action, java.lang.String userId)
           
 boolean canAction(UserAction action, java.lang.String userId, java.util.TreeSet list)
           
 java.util.TreeSet getAllowedPrstatusesForTask(java.lang.String taskId)
          ��� ��������� ������������ � �������, ������� � �������� ������ � ����� ������� ������ ACL, ����������� � ������ (assigned ACL) ����� ����� ������������, �.�.
 java.util.TreeSet getAllowedPrstatusesForUser(java.lang.String toUserId)
           
 java.lang.Object getAttribute(java.lang.String key)
           
static java.lang.String getCookies(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp)
           
 java.lang.String getCurrentSpace()
           
 java.lang.String getDefaultTab()
           
 java.lang.String getId()
           
 java.lang.String getLocale()
           
protected  UserCacheItem getLoggedUser()
           
 int getProgress()
           
 ProgressManager getProgressManager()
           
 java.lang.String getPrstatusId()
           
static javax.servlet.ServletConfig getServletConfig()
           
 java.lang.String getSession()
           
 java.lang.String getTimezone()
           
 SecuredUserBean getUser()
           
 SecuredUserBean getUser(java.lang.String id)
           
 java.lang.String getUserId()
           
 java.lang.String getUserId(java.lang.String toUserId)
           
 boolean isSessionInCookeies()
           
 boolean isTemporary()
           
 void removeAttribute(java.lang.String key)
           
static void resetCookies(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp)
           
 void setAttribute(java.lang.String key, java.lang.Object value)
           
 void setCookies(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp)
           
 void setCurrentSpace(java.lang.String currentSpace, javax.servlet.http.HttpServletRequest request)
           
 void setDefaultTab(java.lang.String defaultTab)
           
protected  void setId(java.lang.String id)
           
 void setProgress(int progress)
           
 void setProgressManager(ProgressManager progressManager)
           
 void setRequestAttribute(javax.servlet.http.HttpServletRequest request, java.lang.String key, java.lang.Object value)
           
static void setServletConfig(javax.servlet.ServletConfig servletConfig1)
           
 void setSessionInCookies(boolean sessionInCookies)
           
 void setTemporary(boolean t)
           
 boolean taskOnSight(java.lang.String taskid)
          Returns a collection of task IDs ���������� ��������� ��������������� �����, ������� ��������� � ����� ������ � ����, �� ������� � ������������ ���� ������.
 boolean userOnSight(java.lang.String userid)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

progress

public int progress

progressManager

protected ProgressManager progressManager
Method Detail

getServletConfig

public static javax.servlet.ServletConfig getServletConfig()

setServletConfig

public static void setServletConfig(javax.servlet.ServletConfig servletConfig1)

setSessionInCookies

public void setSessionInCookies(boolean sessionInCookies)

isSessionInCookeies

public boolean isSessionInCookeies()

getSession

public java.lang.String getSession()
Specified by:
getSession in interface SessionContextInterface

getUser

public SecuredUserBean getUser()
                        throws GranException
Specified by:
getUser in interface SessionContextInterface
Throws:
GranException

getUser

public SecuredUserBean getUser(java.lang.String id)
                        throws GranException
Throws:
GranException

getUserId

public java.lang.String getUserId()
Specified by:
getUserId in interface SessionContextInterface

getUserId

public java.lang.String getUserId(java.lang.String toUserId)
                           throws GranException
Specified by:
getUserId in interface SessionContextInterface
Throws:
GranException

setId

protected void setId(java.lang.String id)

getId

public java.lang.String getId()
Specified by:
getId in interface SessionContextInterface

getLoggedUser

protected UserCacheItem getLoggedUser()

setTemporary

public void setTemporary(boolean t)

isTemporary

public boolean isTemporary()
Specified by:
isTemporary in interface SessionContextInterface

getAllowedPrstatusesForTask

public java.util.TreeSet getAllowedPrstatusesForTask(java.lang.String taskId)
                                              throws GranException
��� ��������� ������������ � �������, ������� � �������� ������ � ����� ������� ������ ACL, ����������� � ������ (assigned ACL) ����� ����� ������������, �.�. �� ����� prstatus. �� ���� ACL ������� prstatus�, ��������� � ��� ����������� ������ ������������.

Parameters:
taskId -
Returns:
Throws:
GranException

getAllowedPrstatusesForUser

public java.util.TreeSet getAllowedPrstatusesForUser(java.lang.String toUserId)
                                              throws GranException
Throws:
GranException

canAction

public boolean canAction(TaskAction action,
                         java.lang.String taskid,
                         java.util.TreeSet list)
                  throws GranException
Throws:
GranException

canAction

public boolean canAction(TaskAction action,
                         java.lang.String taskid)
                  throws GranException
Throws:
GranException

canAction

public boolean canAction(UserAction action,
                         java.lang.String userId,
                         java.util.TreeSet list)
                  throws GranException
Throws:
GranException

canAction

public boolean canAction(UserAction action,
                         java.lang.String userId)
                  throws GranException
Throws:
GranException

allowedByACL

public boolean allowedByACL(java.lang.String taskid)
                     throws GranException
��� ���������� �����, �������� ��� ��� ������������� ����� TrackStudio �� �����. ����� ���������� ����� ������� �� ������������ ������ ��� ������������� ������������.

Specified by:
allowedByACL in interface SessionContextInterface
Parameters:
taskid - ID ������
Returns:
true - ���� ������ ����� access control, false - ���
Throws:
GranException - ��� ������, ���� ������������ ������.

allowedByUser

public boolean allowedByUser(java.lang.String userid)
                      throws GranException
test that current user can view data that own userid

Specified by:
allowedByUser in interface SessionContextInterface
Throws:
GranException

getLocale

public java.lang.String getLocale()
                           throws GranException
Specified by:
getLocale in interface SessionContextInterface
Throws:
GranException

getTimezone

public java.lang.String getTimezone()
                             throws GranException
Specified by:
getTimezone in interface SessionContextInterface
Throws:
GranException

taskOnSight

public boolean taskOnSight(java.lang.String taskid)
                    throws GranException
Returns a collection of task IDs ���������� ��������� ��������������� �����, ������� ��������� � ����� ������ � ����, �� ������� � ������������ ���� ������.

Specified by:
taskOnSight in interface SessionContextInterface
Throws:
GranException

userOnSight

public boolean userOnSight(java.lang.String userid)
                    throws GranException
Specified by:
userOnSight in interface SessionContextInterface
Throws:
GranException

setAttribute

public void setAttribute(java.lang.String key,
                         java.lang.Object value)

setRequestAttribute

public void setRequestAttribute(javax.servlet.http.HttpServletRequest request,
                                java.lang.String key,
                                java.lang.Object value)

getAttribute

public java.lang.Object getAttribute(java.lang.String key)
Specified by:
getAttribute in interface SessionContextInterface

removeAttribute

public void removeAttribute(java.lang.String key)

getPrstatusId

public java.lang.String getPrstatusId()

getCurrentSpace

public java.lang.String getCurrentSpace()

getDefaultTab

public java.lang.String getDefaultTab()

setDefaultTab

public void setDefaultTab(java.lang.String defaultTab)

setCurrentSpace

public void setCurrentSpace(java.lang.String currentSpace,
                            javax.servlet.http.HttpServletRequest request)

getProgressManager

public ProgressManager getProgressManager()

setProgressManager

public void setProgressManager(ProgressManager progressManager)

getProgress

public int getProgress()

setProgress

public void setProgress(int progress)

setCookies

public void setCookies(javax.servlet.http.HttpServletRequest req,
                       javax.servlet.http.HttpServletResponse resp)

getCookies

public static java.lang.String getCookies(javax.servlet.http.HttpServletRequest req,
                                          javax.servlet.http.HttpServletResponse resp)
                                   throws GranException
Throws:
GranException

resetCookies

public static void resetCookies(javax.servlet.http.HttpServletRequest req,
                                javax.servlet.http.HttpServletResponse resp)


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