Java Doc for CmsContextInfo.java in  » Content-Management-System » opencms » org » opencms » main » 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 » Content Management System » opencms » org.opencms.main 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.opencms.main.CmsContextInfo

CmsContextInfo
public class CmsContextInfo (Code)
Contains user information for automated creation of a org.opencms.file.CmsRequestContext during system runtime.


version:
   $Revision: 1.17 $
since:
   6.0.0



Field Summary
final public static  StringATTRIBUTE_REQUEST_TIME
     Name of the http session attribute the request time is stored in.
final public static  longCURRENT_TIME
     Indicates the request time should always be the current time.
final public static  StringLOCALHOST
     Localhost ip used in fallback cases.

Constructor Summary
public  CmsContextInfo()
    
public  CmsContextInfo(CmsRequestContext requestContext)
    
public  CmsContextInfo(CmsUser user, CmsProject project, String requestedUri, String siteRoot, Locale locale, String encoding, String remoteAddr, long requestTime, String ouFqn)
    
public  CmsContextInfo(String userName)
    

Method Summary
protected  voidcheckFrozen()
    
public  Objectclone()
    
public  voidfreeze()
    
public  StringgetEncoding()
    
public  LocalegetLocale()
    
public  StringgetLocaleName()
    
public  StringgetOuFqn()
    
public  CmsProjectgetProject()
    
public  StringgetProjectName()
    
public  StringgetRemoteAddr()
    
public  longgetRequestTime()
    
public  StringgetRequestedUri()
    
public  StringgetSiteRoot()
    
public  CmsUsergetUser()
    
public  StringgetUserName()
    
public  voidsetEncoding(String encoding)
    
public  voidsetLocale(Locale locale)
     Sets the locale.

Setting the locale name will override the currently selected locale and vice-versa.

public  voidsetLocaleName(String localeName)
     Sets the locale name.

Setting the locale name will override the currently selected locale and vice-versa.

public  voidsetOuFqn(String ouFqn)
    
public  voidsetProjectName(String projectName)
    
public  voidsetRemoteAddr(String remoteAddr)
    
public  voidsetRequestTime(long requestTime)
    
public  voidsetRequestedUri(String requestedUri)
    
public  voidsetSiteRoot(String siteRoot)
    
public  voidsetUserName(String userName)
    

Field Detail
ATTRIBUTE_REQUEST_TIME
final public static String ATTRIBUTE_REQUEST_TIME(Code)
Name of the http session attribute the request time is stored in.



CURRENT_TIME
final public static long CURRENT_TIME(Code)
Indicates the request time should always be the current time.



LOCALHOST
final public static String LOCALHOST(Code)
Localhost ip used in fallback cases.




Constructor Detail
CmsContextInfo
public CmsContextInfo()(Code)
Creates a new instance, initializing the variables with some reasonable default values.

The default values are:

User name
(configured default guest user)
Project name
Online
Requested URI
/
Site root
/
Locale name
(configured default locale name)
Encoding
(configured default system encoding)
Remote address
127.0.0.1
Organizational unit
/




CmsContextInfo
public CmsContextInfo(CmsRequestContext requestContext)(Code)
Creates a new instance with all context variables initialized from the given request context.


Parameters:
  requestContext - the request context to initialize this context info with




CmsContextInfo
public CmsContextInfo(CmsUser user, CmsProject project, String requestedUri, String siteRoot, Locale locale, String encoding, String remoteAddr, long requestTime, String ouFqn)(Code)
Creates a new instance with all context variables initialized.


Parameters:
  user - the user to create the context with
Parameters:
  project - the project to create the context with
Parameters:
  requestedUri - the request URI to create the context with
Parameters:
  siteRoot - the site root to create the context with
Parameters:
  locale - the locale to create the context with
Parameters:
  encoding - the encoding to create the context with
Parameters:
  remoteAddr - the remote ip address to create the context with
Parameters:
  requestTime - the time of the request (used for resource publication / expiration date)
Parameters:
  ouFqn - the fully qualified name of the organizational unit to create the context with




CmsContextInfo
public CmsContextInfo(String userName)(Code)
Creates a new instance, initializing the user name as provided and all other vaiables with the same default values as in CmsContextInfo.CmsContextInfo() .


Parameters:
  userName - the user name to create the context with
See Also:   CmsContextInfo.CmsContextInfo()





Method Detail
checkFrozen
protected void checkFrozen() throws CmsRuntimeException(Code)
Checks if this context info configuration is frozen.


throws:
  CmsRuntimeException - in case the configuration is already frozen




clone
public Object clone()(Code)
Creates a clone of this context info object.


See Also:   java.lang.Object.clone




freeze
public void freeze()(Code)
Finalizes (freezes) the configuration of this context information.

After this entry has been frozen, any attempt to change the configuration of this context info with one of the "set..." methods will lead to a RuntimeException.




getEncoding
public String getEncoding()(Code)
Returns the encoding.

the encoding
See Also:   CmsRequestContext.getEncoding




getLocale
public Locale getLocale()(Code)
Returns the locale.

the locale
See Also:   CmsRequestContext.getLocale




getLocaleName
public String getLocaleName()(Code)
Returns the locale name.

the locale name
See Also:   CmsRequestContext.getLocale




getOuFqn
public String getOuFqn()(Code)
Returns the fully qualified name of the organizational unit.

the fully qualified name of the organizational unit




getProject
public CmsProject getProject()(Code)
Returns the project, or null if the project has not been configured.

If the project has not been configured, at last the project name will be available.

the project
See Also:   CmsContextInfo.getProjectName()
See Also:   CmsRequestContext.currentProject




getProjectName
public String getProjectName()(Code)
Returns the project name.

the project name
See Also:   CmsContextInfo.getProject()
See Also:   CmsRequestContext.currentProject




getRemoteAddr
public String getRemoteAddr()(Code)
Returns the remote ip address.

the remote ip address
See Also:   CmsRequestContext.getRemoteAddress




getRequestTime
public long getRequestTime()(Code)
Returns the request time used for validation of resource publication and expiration dates.

the request time used for validation of resource publication and expiration dates
See Also:   CmsRequestContext.getRequestTime




getRequestedUri
public String getRequestedUri()(Code)
Returns the requested uri.

the requested uri
See Also:   CmsRequestContext.getUri




getSiteRoot
public String getSiteRoot()(Code)
Returns the siteroot.

the siteroot
See Also:   CmsRequestContext.getSiteRoot




getUser
public CmsUser getUser()(Code)
Returns the user, or null if the user has not been configured.

If the user has not been configured, at last the user name will be available.

the user
See Also:   CmsContextInfo.getUserName()
See Also:   CmsRequestContext.currentUser




getUserName
public String getUserName()(Code)
Returns the username.

the username
See Also:   CmsContextInfo.getUser()
See Also:   CmsRequestContext.currentUser




setEncoding
public void setEncoding(String encoding)(Code)
Sets the encoding.


Parameters:
  encoding - the encoding to set
See Also:   CmsRequestContext.setEncoding(String)




setLocale
public void setLocale(Locale locale)(Code)
Sets the locale.

Setting the locale name will override the currently selected locale and vice-versa. The locale name and the locale will always match.


Parameters:
  locale - the locale to set
See Also:   CmsContextInfo.setLocaleName(String)
See Also:   CmsRequestContext.getLocale




setLocaleName
public void setLocaleName(String localeName)(Code)
Sets the locale name.

Setting the locale name will override the currently selected locale and vice-versa. The locale name and the locale will always match.


Parameters:
  localeName - the locale name to set
See Also:   CmsContextInfo.setLocale(Locale)
See Also:   CmsRequestContext.getLocale




setOuFqn
public void setOuFqn(String ouFqn)(Code)
Sets the fully qualified name of the organizational unit.


Parameters:
  ouFqn - the fully qualified name of the organizational unit to set




setProjectName
public void setProjectName(String projectName)(Code)
Sets the project name.


Parameters:
  projectName - the project name to set
See Also:   CmsRequestContext.currentProject




setRemoteAddr
public void setRemoteAddr(String remoteAddr)(Code)
Sets the remote ip address.


Parameters:
  remoteAddr - the remote ip address
See Also:   CmsRequestContext.getRemoteAddress




setRequestTime
public void setRequestTime(long requestTime)(Code)
Sets the request time used for validation of resource publication and expiration dates.


Parameters:
  requestTime - the request time to set
See Also:   CmsRequestContext.getRequestTime




setRequestedUri
public void setRequestedUri(String requestedUri)(Code)
Sets the requested uri.


Parameters:
  requestedUri - the requested uri to set
See Also:   CmsRequestContext.setUri(String)




setSiteRoot
public void setSiteRoot(String siteRoot)(Code)
Sets the siteroot.


Parameters:
  siteRoot - the siteroot to set
See Also:   CmsRequestContext.setSiteRoot(String)




setUserName
public void setUserName(String userName)(Code)
Sets the username.


Parameters:
  userName - the username to set
See Also:   CmsRequestContext.currentUser




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.