| |
|
| 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 String | ATTRIBUTE_REQUEST_TIME Name of the http session attribute the request time is stored in. | final public static long | CURRENT_TIME Indicates the request time should always be the current time. | final public static String | LOCALHOST Localhost ip used in fallback cases. |
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.
|
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 |
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 .
|
getOuFqn | public String getOuFqn()(Code) | | Returns the fully qualified name of the organizational unit.
the fully qualified name of the organizational unit |
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 |
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 |
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 |
|
|
|