Java Doc for FxContext.java in  » J2EE » fleXive » com » flexive » shared » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » J2EE » fleXive » com.flexive.shared 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   com.flexive.shared.FxContext

FxContext
public class FxContext implements Serializable(Code)
The [fleXive] context - user session specific data like UserTickets, etc.
author:
   Daniel Lichtenberger (daniel.lichtenberger@flexive.com), UCS - unique computing solutions gmbh (http://www.ucs.at)
author:
   Gregor Schober (gregor.schober@flexive.com), UCS - unique computing solutions gmbh (http://www.ucs.at)
author:
   Markus Plesser (markus.plesser@flexive.com), UCS - unique computing solutions gmbh (http://www.ucs.at)


Field Summary
final public static  StringADMIN_AUTHENTICATED
    
final public static  intDIV_GLOBAL_CONFIGURATION
    
final public static  intDIV_UNDEFINED
    


Method Summary
public  void_reloadUserTicket()
     Reload the UserTicket, needed i.e.
public static  voidcleanup()
     Performs a cleanup of the stored informations.
public static  FxContextget()
    
public  StringgetAbsolutePath(String path)
     Returns the absolute path for the given resource (i.e.
public  StringgetApplicationId()
     Returns the id of the appication the request was made in.
public  StringgetContextPath()
     Return the context path of this request.
public  intgetDivisionId()
     Returns the id of the division.
public  FxLanguagegetLanguage()
    
protected static  UserTicketgetLastUserTicket(HttpSession session)
    
public  LocalegetLocale()
    
public  longgetNodeId()
    
public  StringgetRelativeRequestURI()
     Returns the decoded relative request URI.
public  StringgetRelativeRequestURI(boolean decode)
     Returns the relative request URI.
public  StringgetRemoteHost()
     Returns the calling remote host.
public  StringgetRequestURI()
     Returns the request URI.
public  StringgetRequestUriNoContext()
     Returns the request URI without its context.
public  booleangetRunAsSystem()
     Returns true if all calls are done without permission checks for the time beeing.
public  StringgetServer()
     Returns the full server URL including the port for this request, e.g.
public  StringgetServerName()
     Returns the name of the server handling this request, e.g.
public  intgetServerPort()
     Returns the port of the server handling this request, e.g.
public  StringgetSessionId()
    
public  UserTicketgetTicket()
    
public  booleangetTreeWasModified()
     Returns true if the tree was modified within this thread by the user belonging to this thread.
public  booleanisGlobalAuthenticated()
    
public  booleanisGlobalConfigDivision()
     Returns true if the division is the global configuration division.
public  booleanisTestDivision()
     Return true if the current context runs in the test division.
public  booleanisWebDAV()
     Returns true if this request is triggered by a webdav operation.
public  voidlogin(String loginname, String password, boolean takeOver)
     Tries to login a user.
public  voidlogout()
     Logout of the current user.
public  voidoverrideTicket(UserTicket ticket)
     Override the used ticket.
public  voidrunAsSystem()
     Runs all further calls as SYSTEM user with full permissions until stopRunAsSystem gets called.
public  voidsetContextPath(String contextPath)
    
public  voidsetDivisionId(int division)
     Changes the divison ID.
public  voidsetGlobalAuthenticated(boolean globalAuthenticated)
    
protected static  voidsetLastUserTicket(HttpSession session, UserTicket lastUserTicket)
    
public  voidsetNodeId(long nodeId)
    
public  voidsetTicket(UserTicket ticket)
    
public  voidsetTreeWasModified()
    
public  voidstopRunAsSystem()
     Removes one runeAsSystem flag from the stack.
public static  FxContextstoreInfos(HttpServletRequest request, boolean dynamicContent, int divisionId, boolean isWebdav)
     Stores the needed informations about the sessions.
public  StringtoString()
     Returns a string representation of the object.

Field Detail
ADMIN_AUTHENTICATED
final public static String ADMIN_AUTHENTICATED(Code)
Session key set if the user successfully logged into the admin area



DIV_GLOBAL_CONFIGURATION
final public static int DIV_GLOBAL_CONFIGURATION(Code)
Global division id



DIV_UNDEFINED
final public static int DIV_UNDEFINED(Code)
Undefined division id





Method Detail
_reloadUserTicket
public void _reloadUserTicket()(Code)
Reload the UserTicket, needed i.e. when language settings change



cleanup
public static void cleanup()(Code)
Performs a cleanup of the stored informations.



get
public static FxContext get()(Code)
Gets the session information for the running thread the session information for the running thread



getAbsolutePath
public String getAbsolutePath(String path)(Code)
Returns the absolute path for the given resource (i.e. the application name + the path).
Parameters:
  path - the path of the resource (e.g. /pub/css/demo.css) the absolute path for the given resource



getApplicationId
public String getApplicationId()(Code)
Returns the id of the appication the request was made in.

In webapps the application id equals the context path the id of the appication the request was made in.




getContextPath
public String getContextPath()(Code)
Return the context path of this request. the context path of this request.



getDivisionId
public int getDivisionId()(Code)
Returns the id of the division.

the id of the division.




getLanguage
public FxLanguage getLanguage()(Code)
Get the current users preferred language the current users preferred language



getLastUserTicket
protected static UserTicket getLastUserTicket(HttpSession session)(Code)



getLocale
public Locale getLocale()(Code)
Get the current users preferred locale (based on his preferred language) the current users preferred locale (based on his preferred language)



getNodeId
public long getNodeId()(Code)
Get the current users active tree node id (CMS extension) the current users active tree node id



getRelativeRequestURI
public String getRelativeRequestURI()(Code)
Returns the decoded relative request URI.

This function is the same as calling getRelativeRequestURI(true). the URI without its context path




getRelativeRequestURI
public String getRelativeRequestURI(boolean decode)(Code)
Returns the relative request URI.
Parameters:
  decode - if set to true the URI will be decoded (eg "%20" to a space), using UTF-8 the URI without its context path



getRemoteHost
public String getRemoteHost()(Code)
Returns the calling remote host. the remote host.



getRequestURI
public String getRequestURI()(Code)
Returns the request URI.

This URI contains the context path, use getRelativeRequestURI() to retrieve the path without it. the request URI




getRequestUriNoContext
public String getRequestUriNoContext()(Code)
Returns the request URI without its context. the request URI without its context.



getRunAsSystem
public boolean getRunAsSystem()(Code)
Returns true if all calls are done without permission checks for the time beeing. true if all calls are done without permission checks for the time beeing



getServer
public String getServer()(Code)
Returns the full server URL including the port for this request, e.g. http://www.flexive.com:8080 the full server URL including the port for this request, e.g. http://www.flexive.com:8080



getServerName
public String getServerName()(Code)
Returns the name of the server handling this request, e.g. www.flexive.com the name of the server handling this request, e.g. www.flexive.com



getServerPort
public int getServerPort()(Code)
Returns the port of the server handling this request, e.g. 80 the port of the server handling this request, e.g. 80



getSessionId
public String getSessionId()(Code)
Returns the session id, which is unique at call time the session's id



getTicket
public UserTicket getTicket()(Code)



getTreeWasModified
public boolean getTreeWasModified()(Code)
Returns true if the tree was modified within this thread by the user belonging to this thread. true if the tree was modified



isGlobalAuthenticated
public boolean isGlobalAuthenticated()(Code)
Return true if the user successfully authenticated for the global configuration area true if the user successfully authenticated for the global configuration



isGlobalConfigDivision
public boolean isGlobalConfigDivision()(Code)
Returns true if the division is the global configuration division. true if the division is the global configuration division



isTestDivision
public boolean isTestDivision()(Code)
Return true if the current context runs in the test division. true if the current context runs in the test division.



isWebDAV
public boolean isWebDAV()(Code)
Returns true if this request is triggered by a webdav operation. true if this request is triggered by a webdav operation



login
public void login(String loginname, String password, boolean takeOver) throws FxLoginFailedException, FxAccountInUseException(Code)
Tries to login a user.

The next getUserTicket() call will return the new ticket.
Parameters:
  loginname - the unique user name
Parameters:
  password - the password
Parameters:
  takeOver - the take over flag
throws:
  FxLoginFailedException - if the login failed
throws:
  FxAccountInUseException - if take over was false and the account is in use




logout
public void logout() throws FxLogoutFailedException(Code)
Logout of the current user.
throws:
  FxLogoutFailedException - if the function fails



overrideTicket
public void overrideTicket(UserTicket ticket)(Code)
Override the used ticket. Please do not use this method! Its only purpose is to feed FxContext with a USerTicket when no user is logged in - ie during system startup
Parameters:
  ticket - ticket to override with



runAsSystem
public void runAsSystem()(Code)
Runs all further calls as SYSTEM user with full permissions until stopRunAsSystem gets called. Multiple calls to this function get stacked and the runAsSystem flag is only removed when the stack is empty.



setContextPath
public void setContextPath(String contextPath)(Code)
Changes the context path (Currently needed for embedded container testing.)
Parameters:
  contextPath - the context path



setDivisionId
public void setDivisionId(int division)(Code)
Changes the divison ID. Use with care! (Currently needed for embedded container testing.)
Parameters:
  division - the division id



setGlobalAuthenticated
public void setGlobalAuthenticated(boolean globalAuthenticated)(Code)
Authorize the user for the global configuration area
Parameters:
  globalAuthenticated - true if the user should be authorized for the global configuration



setLastUserTicket
protected static void setLastUserTicket(HttpSession session, UserTicket lastUserTicket)(Code)



setNodeId
public void setNodeId(long nodeId)(Code)
Set the current users active tree node id (CMS extension)
Parameters:
  nodeId - active tree node id



setTicket
public void setTicket(UserTicket ticket)(Code)



setTreeWasModified
public void setTreeWasModified()(Code)
Flag the tree as modified



stopRunAsSystem
public void stopRunAsSystem()(Code)
Removes one runeAsSystem flag from the stack.



storeInfos
public static FxContext storeInfos(HttpServletRequest request, boolean dynamicContent, int divisionId, boolean isWebdav)(Code)
Stores the needed informations about the sessions.
Parameters:
  request - the users request
Parameters:
  dynamicContent - is the content dynamic?
Parameters:
  divisionId - the division id
Parameters:
  isWebdav - true if this is an webdav request FxContext



toString
public String toString()(Code)
Returns a string representation of the object. a string representation of the object.



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.