/*******************************************************************************
* Copyright (c) 2007-2008 Cambridge Semantics Incorporated.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* File: $Source$
* Created by: Generated Source from org.openanzo.rdf.utils.properties.jet
* Created on: Generated Source from org.openanzo.rdf.utils.properties.jet
* Revision: $Id$
*
* Contributors:
* Cambridge Semantics Incorporated - initial API and implementation
*******************************************************************************/
package org.openanzo.servlet;
import java.util.Dictionary;
/**
* Base configuration properties that are used by servlets.
* @author Generated Source from org.openanzo.rdf.utils.properties.jet
*/
public class ServletDictionary{
/**
* Key for property "org.openanzo.servlet.pathSpec"
* PathSpec
*
*/
public static final String KEY_PATH_SPEC = "org.openanzo.servlet.pathSpec";
/**
* Key for property "org.openanzo.servlet.protectedPathSpec"
* Protected PathSpec
*
*/
public static final String KEY_PROTECTED_PATH_SPEC = "org.openanzo.servlet.protectedPathSpec";
/**
* Key for property "org.openanzo.servlet.contextPath"
* PathSpec
*
*/
public static final String KEY_CONTEXT_PATH = "org.openanzo.servlet.contextPath";
/**
* Key for property "org.openanzo.servlet.docRoot"
* Doc root
*
*/
public static final String KEY_DOC_ROOT = "org.openanzo.servlet.docRoot";
/**
* Key for property "org.openanzo.servlet.authorizationType"
* Auth type.
*
*/
public static final String KEY_AUTH_TYPE = "org.openanzo.servlet.authorizationType";
/**
* Key for property "org.openanzo.servlet.securityConstraint"
* Security Constraint
*
*/
public static final String KEY_SECURITY_CONSTRAINT = "org.openanzo.servlet.securityConstraint";
/**
* Key for property "org.openanzo.servlet.loginPage"
* login page url
*
*/
public static final String KEY_LOGIN_PAGE = "org.openanzo.servlet.loginPage";
/**
* Key for property "org.openanzo.servlet.errorPage"
* error page url
*
*/
public static final String KEY_ERROR_PAGE = "org.openanzo.servlet.errorPage";
/**
* Key for property "org.openanzo.servlet.customTokenRefreshEnabled"
* Doc root
*
*/
public static final String KEY_CUSTOME_TOKEN_REFRESH = "org.openanzo.servlet.customTokenRefreshEnabled";
/**
* Key for property "org.openanzo.servlet.gzipOutput"
* GZIP output
*
*/
public static final String KEY_GZIP_OUTPUT = "org.openanzo.servlet.gzipOutput";
/**
* Key for property "org.openanzo.servlet.authTokenTimeout"
* Auth token timeout
*
*/
public static final String KEY_AUTH_TOKEN_TIMEOUT = "org.openanzo.servlet.authTokenTimeout";
/**
* Key for property "org.openanzo.servlet.authTokenRefreshWindow"
* Auth token refresh window
*
*/
public static final String KEY_AUTH_TOKEN_REFRESH_WINDOW = "org.openanzo.servlet.authTokenRefreshWindow";
/**
* Key for property "org.openanzo.servlet.servletClass"
* Servlet ClassName
*
*/
public static final String KEY_SERVLET_CLASS = "org.openanzo.servlet.servletClass";
/**
* Get {@link #KEY_PATH_SPEC} property from properties
*
* @param properties
* containing configuration data
*
* @return value of {@link #KEY_PATH_SPEC} if not present
*/
@SuppressWarnings("unchecked")
static public String getPathSpec(Dictionary properties) {
Object _prop = properties.get(KEY_PATH_SPEC);
return (_prop!=null)?_prop.toString():null;
}
/**
* Set {@link #KEY_PATH_SPEC} property to pathSpec in properties
*
* @param properties
* containing configuration data
* @param pathSpec
* value for pathSpec
*/
@SuppressWarnings("unchecked")
static public void setPathSpec(Dictionary properties, String pathSpec) {
if(pathSpec==null){
properties.remove(KEY_PATH_SPEC);
}else{
properties.put(KEY_PATH_SPEC, pathSpec);
}
}
/**
* Get {@link #KEY_PROTECTED_PATH_SPEC} property from properties
*
* @param properties
* containing configuration data
*
* @return value of {@link #KEY_PROTECTED_PATH_SPEC} if not present
*/
@SuppressWarnings("unchecked")
static public String getProtectedPathSpec(Dictionary properties) {
Object _prop = properties.get(KEY_PROTECTED_PATH_SPEC);
return (_prop!=null)?_prop.toString():null;
}
/**
* Set {@link #KEY_PROTECTED_PATH_SPEC} property to protectedPathSpec in properties
*
* @param properties
* containing configuration data
* @param protectedPathSpec
* value for protectedPathSpec
*/
@SuppressWarnings("unchecked")
static public void setProtectedPathSpec(Dictionary properties, String protectedPathSpec) {
if(protectedPathSpec==null){
properties.remove(KEY_PROTECTED_PATH_SPEC);
}else{
properties.put(KEY_PROTECTED_PATH_SPEC, protectedPathSpec);
}
}
/**
* Get {@link #KEY_CONTEXT_PATH} property from properties
*
* @param properties
* containing configuration data
*
* @return value of {@link #KEY_CONTEXT_PATH} if not present
*/
@SuppressWarnings("unchecked")
static public String getContextPath(Dictionary properties) {
Object _prop = properties.get(KEY_CONTEXT_PATH);
return (_prop!=null)?_prop.toString():null;
}
/**
* Set {@link #KEY_CONTEXT_PATH} property to contextPath in properties
*
* @param properties
* containing configuration data
* @param contextPath
* value for contextPath
*/
@SuppressWarnings("unchecked")
static public void setContextPath(Dictionary properties, String contextPath) {
if(contextPath==null){
properties.remove(KEY_CONTEXT_PATH);
}else{
properties.put(KEY_CONTEXT_PATH, contextPath);
}
}
/**
* Get {@link #KEY_DOC_ROOT} property from properties
*
* @param properties
* containing configuration data
*
* @return value of {@link #KEY_DOC_ROOT} if not present
*/
@SuppressWarnings("unchecked")
static public String getDocRoot(Dictionary properties) {
Object _prop = properties.get(KEY_DOC_ROOT);
return (_prop!=null)?_prop.toString():null;
}
/**
* Set {@link #KEY_DOC_ROOT} property to docRoot in properties
*
* @param properties
* containing configuration data
* @param docRoot
* value for docRoot
*/
@SuppressWarnings("unchecked")
static public void setDocRoot(Dictionary properties, String docRoot) {
if(docRoot==null){
properties.remove(KEY_DOC_ROOT);
}else{
properties.put(KEY_DOC_ROOT, docRoot);
}
}
/**
* Get {@link #KEY_AUTH_TYPE} property from properties
*
* @param properties
* containing configuration data
*
* @return value of {@link #KEY_AUTH_TYPE} if not present
*/
@SuppressWarnings("unchecked")
static public String getAuthorizationType(Dictionary properties) {
Object _prop = properties.get(KEY_AUTH_TYPE);
return (_prop!=null)?_prop.toString():null;
}
/**
* Set {@link #KEY_AUTH_TYPE} property to authorizationType in properties
*
* @param properties
* containing configuration data
* @param authorizationType
* value for authorizationType
*/
@SuppressWarnings("unchecked")
static public void setAuthorizationType(Dictionary properties, String authorizationType) {
if(authorizationType==null){
properties.remove(KEY_AUTH_TYPE);
}else{
properties.put(KEY_AUTH_TYPE, authorizationType);
}
}
/**
* Get {@link #KEY_SECURITY_CONSTRAINT} property from properties
*
* @param properties
* containing configuration data
*
* @return value of {@link #KEY_SECURITY_CONSTRAINT} if not present
*/
@SuppressWarnings("unchecked")
static public String getSecurityConstraint(Dictionary properties) {
Object _prop = properties.get(KEY_SECURITY_CONSTRAINT);
return (_prop!=null)?_prop.toString():null;
}
/**
* Set {@link #KEY_SECURITY_CONSTRAINT} property to securityConstraint in properties
*
* @param properties
* containing configuration data
* @param securityConstraint
* value for securityConstraint
*/
@SuppressWarnings("unchecked")
static public void setSecurityConstraint(Dictionary properties, String securityConstraint) {
if(securityConstraint==null){
properties.remove(KEY_SECURITY_CONSTRAINT);
}else{
properties.put(KEY_SECURITY_CONSTRAINT, securityConstraint);
}
}
/**
* Get {@link #KEY_LOGIN_PAGE} property from properties
*
* @param properties
* containing configuration data
*
* @return value of {@link #KEY_LOGIN_PAGE} if not present
*/
@SuppressWarnings("unchecked")
static public String getLoginPage(Dictionary properties) {
Object _prop = properties.get(KEY_LOGIN_PAGE);
return (_prop!=null)?_prop.toString():null;
}
/**
* Set {@link #KEY_LOGIN_PAGE} property to loginPage in properties
*
* @param properties
* containing configuration data
* @param loginPage
* value for loginPage
*/
@SuppressWarnings("unchecked")
static public void setLoginPage(Dictionary properties, String loginPage) {
if(loginPage==null){
properties.remove(KEY_LOGIN_PAGE);
}else{
properties.put(KEY_LOGIN_PAGE, loginPage);
}
}
/**
* Get {@link #KEY_ERROR_PAGE} property from properties
*
* @param properties
* containing configuration data
*
* @return value of {@link #KEY_ERROR_PAGE} if not present
*/
@SuppressWarnings("unchecked")
static public String getErrorPage(Dictionary properties) {
Object _prop = properties.get(KEY_ERROR_PAGE);
return (_prop!=null)?_prop.toString():null;
}
/**
* Set {@link #KEY_ERROR_PAGE} property to errorPage in properties
*
* @param properties
* containing configuration data
* @param errorPage
* value for errorPage
*/
@SuppressWarnings("unchecked")
static public void setErrorPage(Dictionary properties, String errorPage) {
if(errorPage==null){
properties.remove(KEY_ERROR_PAGE);
}else{
properties.put(KEY_ERROR_PAGE, errorPage);
}
}
/**
* Get {@link #KEY_CUSTOME_TOKEN_REFRESH} property from properties
*
* @param properties
* containing configuration data
*
* @return value of {@link #KEY_CUSTOME_TOKEN_REFRESH},or "false" if not present
*/
@SuppressWarnings("unchecked")
static public Boolean getCustomTokenRefreshEnabled(Dictionary properties) {
Object _prop=properties.get(KEY_CUSTOME_TOKEN_REFRESH);
if(_prop==null){
_prop=Boolean.valueOf(false);
}
return (_prop!=null)?Boolean.valueOf(_prop.toString()):null;
}
/**
* Set {@link #KEY_CUSTOME_TOKEN_REFRESH} property to customTokenRefreshEnabled in properties
*
* @param properties
* containing configuration data
* @param customTokenRefreshEnabled
* value for customTokenRefreshEnabled
*/
@SuppressWarnings("unchecked")
static public void setCustomTokenRefreshEnabled(Dictionary properties, Boolean customTokenRefreshEnabled) {
if(customTokenRefreshEnabled==null){
properties.remove(KEY_CUSTOME_TOKEN_REFRESH);
}else{
properties.put(KEY_CUSTOME_TOKEN_REFRESH, customTokenRefreshEnabled.toString());
}
}
/**
* Get {@link #KEY_GZIP_OUTPUT} property from properties
*
* @param properties
* containing configuration data
*
* @return value of {@link #KEY_GZIP_OUTPUT},or "true" if not present
*/
@SuppressWarnings("unchecked")
static public Boolean getGzipOutput(Dictionary properties) {
Object _prop=properties.get(KEY_GZIP_OUTPUT);
if(_prop==null){
_prop=Boolean.valueOf(true);
}
return (_prop!=null)?Boolean.valueOf(_prop.toString()):null;
}
/**
* Set {@link #KEY_GZIP_OUTPUT} property to gzipOutput in properties
*
* @param properties
* containing configuration data
* @param gzipOutput
* value for gzipOutput
*/
@SuppressWarnings("unchecked")
static public void setGzipOutput(Dictionary properties, Boolean gzipOutput) {
if(gzipOutput==null){
properties.remove(KEY_GZIP_OUTPUT);
}else{
properties.put(KEY_GZIP_OUTPUT, gzipOutput.toString());
}
}
/**
* Get {@link #KEY_AUTH_TOKEN_TIMEOUT} property from properties
*
* @param properties
* containing configuration data
*
* @return value of {@link #KEY_AUTH_TOKEN_TIMEOUT} if not present
*/
@SuppressWarnings("unchecked")
static public Integer getAuthTokenTimeout(Dictionary properties) {
Object _prop= properties.get(KEY_AUTH_TOKEN_TIMEOUT);
Integer value= (_prop!=null)?Integer.valueOf(_prop.toString()):null;
if(value!=null&&value <= 0)
throw new org.openanzo.exceptions.AnzoRuntimeException(org.openanzo.exceptions.ExceptionConstants.OSGI.PARAM_GREATER_THAN,"authTokenTimeout","0");
if(value!=null&&value >= 65536)
throw new org.openanzo.exceptions.AnzoRuntimeException(org.openanzo.exceptions.ExceptionConstants.OSGI.PARAM_LESS_THAN,"authTokenTimeout","65536");
return value;
}
/**
* Set {@link #KEY_AUTH_TOKEN_TIMEOUT} property to authTokenTimeout in properties
*
* @param properties
* containing configuration data
* @param authTokenTimeout
* value for authTokenTimeout
*/
@SuppressWarnings("unchecked")
static public void setAuthTokenTimeout(Dictionary properties, Integer authTokenTimeout) {
if(authTokenTimeout==null){
properties.remove(KEY_AUTH_TOKEN_TIMEOUT);
}else{
if(authTokenTimeout <= 0)
throw new org.openanzo.exceptions.AnzoRuntimeException(org.openanzo.exceptions.ExceptionConstants.OSGI.PARAM_GREATER_THAN,"authTokenTimeout","0");
if(authTokenTimeout >= 65536)
throw new org.openanzo.exceptions.AnzoRuntimeException(org.openanzo.exceptions.ExceptionConstants.OSGI.PARAM_LESS_THAN,"authTokenTimeout","65536");
properties.put(KEY_AUTH_TOKEN_TIMEOUT, Integer.toString(authTokenTimeout));
}
}
/**
* Get {@link #KEY_AUTH_TOKEN_REFRESH_WINDOW} property from properties
*
* @param properties
* containing configuration data
*
* @return value of {@link #KEY_AUTH_TOKEN_REFRESH_WINDOW} if not present
*/
@SuppressWarnings("unchecked")
static public Integer getAuthTokenRefreshWindow(Dictionary properties) {
Object _prop= properties.get(KEY_AUTH_TOKEN_REFRESH_WINDOW);
Integer value= (_prop!=null)?Integer.valueOf(_prop.toString()):null;
if(value!=null&&value <= 0)
throw new org.openanzo.exceptions.AnzoRuntimeException(org.openanzo.exceptions.ExceptionConstants.OSGI.PARAM_GREATER_THAN,"authTokenRefreshWindow","0");
if(value!=null&&value >= 65536)
throw new org.openanzo.exceptions.AnzoRuntimeException(org.openanzo.exceptions.ExceptionConstants.OSGI.PARAM_LESS_THAN,"authTokenRefreshWindow","65536");
return value;
}
/**
* Set {@link #KEY_AUTH_TOKEN_REFRESH_WINDOW} property to authTokenRefreshWindow in properties
*
* @param properties
* containing configuration data
* @param authTokenRefreshWindow
* value for authTokenRefreshWindow
*/
@SuppressWarnings("unchecked")
static public void setAuthTokenRefreshWindow(Dictionary properties, Integer authTokenRefreshWindow) {
if(authTokenRefreshWindow==null){
properties.remove(KEY_AUTH_TOKEN_REFRESH_WINDOW);
}else{
if(authTokenRefreshWindow <= 0)
throw new org.openanzo.exceptions.AnzoRuntimeException(org.openanzo.exceptions.ExceptionConstants.OSGI.PARAM_GREATER_THAN,"authTokenRefreshWindow","0");
if(authTokenRefreshWindow >= 65536)
throw new org.openanzo.exceptions.AnzoRuntimeException(org.openanzo.exceptions.ExceptionConstants.OSGI.PARAM_LESS_THAN,"authTokenRefreshWindow","65536");
properties.put(KEY_AUTH_TOKEN_REFRESH_WINDOW, Integer.toString(authTokenRefreshWindow));
}
}
/**
* Get {@link #KEY_SERVLET_CLASS} property from properties
*
* @param properties
* containing configuration data
*
* @return value of {@link #KEY_SERVLET_CLASS} if not present
*/
@SuppressWarnings("unchecked")
static public String getServletClass(Dictionary properties) {
Object _prop = properties.get(KEY_SERVLET_CLASS);
return (_prop!=null)?_prop.toString():null;
}
/**
* Set {@link #KEY_SERVLET_CLASS} property to servletClass in properties
*
* @param properties
* containing configuration data
* @param servletClass
* value for servletClass
*/
@SuppressWarnings("unchecked")
static public void setServletClass(Dictionary properties, String servletClass) {
if(servletClass==null){
properties.remove(KEY_SERVLET_CLASS);
}else{
properties.put(KEY_SERVLET_CLASS, servletClass);
}
}
}