Parameter

Jease uses different parameters which are stored within the database for its configuration. A parameter is a pair of key and value (both strings). Parameters can be created/edited by an administrator via CMS » System » Parameter.

Existing default parameters

JEASE_CMS_AUTHENTICATOR
Fully qualified class name of a class which extends jease.cms.service.Authenticator and overwrites the #identity()-method in order to provide custom authorizations. If this parameter is present (but it may be empty), non editors don't see the user-management tab.

JEASE_CMS_MAINTENANCE
If this parameter is not-empty, the CMS runs in maintenance mode. All users (besides administrators) will see the the message stored in the parameter and will be automatically logged out after their next action.

JEASE_CONTENT_CUSTOMIZER
A dynamically compiled jfix.functor.Procedure<Content> which is applied to a content object before it is persisted to the database. This can be used to replace absolute urls with included domain with appropriate interal links with "magic" relocation prefix:

import jfix.functor.*;
import jease.cms.domain.*;

public class Customizer implements Procedure<Content> {

  public void execute(Content content) {
     content.replace("=\"http://www.jease.org/","=\"./~/");
  }
  
}

JEASE_DISCUSSION_PRESENTATION
Enter "thread" if you want a threaded view for discussions, otherwise a flat view is used.

JEASE_REVISION_COUNT
The total number of revisions Jease should keep for each content object.

JEASE_REVISION_DAYS
The number of days in the past for which Jease should keep content revisions.

JEASE_SITE_DESIGN
The name or path of the default design. It should either be a simple name of a folder contained in /site/web which holds a Page.jsp which defines the overall layout of the site or an absolute path starting with a slash (/) to a Page.jsp. If the second option is used, Jease prevents the layout to be overriden by a Cookie parameter. If this parameter is not present at all, Jease doesn't show any "View"-buttons, so Jease can be used as a Document Management System (DMS) this way.

JEASE_SITE_ERROR
The path to a resources stored in the CMS which is used as error-page for 404-errors.

JEASE_SITE_REWRITER
Code of Java class which implements jfix.functor.Function<String, String> and can be used to rewrite the resulting HTML for a page. In order to make this work you have to enable the site rewriting via the web.xml.

JEASE_SMTP_PROPERTIES
Default properties to configure JavaMail.

Using parameters in templates

If you want to make use of parameters in your templates, you can simply use the following code:

<%= jease.Registry.getParameter("YourParameter") %>

Last modified on 2011-07-04 by Maik Jablonski

Want to contribute?

Do you want to contribute to Jease? Writing documentation is a good place to get started and will help to get people becoming more familiar with Jease. Any contribution is appreciated.