| Home >> All >> org >> apache >> [ turbine Javadoc ] |
| | org.apache.turbine.flux.* (12) | | org.apache.turbine.modules.* (58) | | org.apache.turbine.om.* (23) |
| | org.apache.turbine.services.* (258) | | org.apache.turbine.test.* (6) | | org.apache.turbine.util.* (135) |
org.apache.turbine: Javadoc index of package org.apache.turbine.
Package Samples:
org.apache.turbine.services.assemblerbroker.util: Assemblerbroker Service looks for action, screen, page, layout classes based on class fragments.
org.apache.turbine.services.assemblerbroker.util.python: Assemblerbroker Service looks for action, screen, page, layout classes based on class fragments.
org.apache.turbine.services.security.ldap: The security service can be used to authenticate users based on database information.
org.apache.turbine.services.security.passive: The security service can be used to authenticate users based on database information.
org.apache.turbine.modules.actions: Modules (Action, Screen, Layout, Navigation, Page) classes for the Turbine view.
org.apache.turbine.services.jsp.util: JSP Service is used to provide Turbine with a Java Server page (JSP) based view.
org.apache.turbine.services.template.mapper: Template Service maps template references to a view service and a template name.
org.apache.turbine.services.crypto.provider: Contains the Crypto Service providing you with a variety of Crypto algorithms.
org.apache.turbine.services.mimetype.util: Provides mapping between MIME types and their corresponding file extensions.
org.apache.turbine.services.pull.tools: Provides application tools that are put into the context of a template view.
org.apache.turbine.services.xmlrpc.util: The XML-RPC Service can be used to communicate with a remote application.
org.apache.turbine.util.mail: Various utilities used in Turbine and for Turbine based applications.
org.apache.turbine.util.validation: Various utilities used in Turbine and for Turbine based applications.
org.apache.turbine.services.assemblerbroker.util.java: The various lookup factories for the Assemblerbroker service.
org.apache.turbine.services.intake.model: The intake service can validate user input from HTML forms.
org.apache.turbine.services.intake.transform: The intake service can validate user input from HTML forms.
org.apache.turbine.om.security.peer: Security object definitions for the Security Service.
org.apache.turbine.services.assemblerbroker: Contains the Service framework for Turbine.
org.apache.turbine.services.resources: Contains the Service framework for Turbine.
org.apache.turbine.modules.screens: Turbine Servlet and Constants.
Classes:
TurbineTemplateService: This service provides a method for mapping templates to their appropriate Screens or Navigations. It also allows templates to define a layout/navigations/screen modularization within the template structure. It also performs caching if turned on in the properties file. This service is not bound to a specific templating engine but we will use the Velocity templating engine for the examples. It is available by using the VelocityService. This assumes the following properties in the Turbine configuration: # Register the VelocityService for the "vm" extension. services.VelocityService.template.extension=vm ...
TurbinePullService: This is the concrete implementation of the Turbine Pull Service. These are tools that are placed in the context by the service These tools will be made available to all your templates. You list the tools in the following way: tool.<scope>.<id> = <classname> <scope> is the tool scope: global, request, session, authorized or persistent (see below for more details) <id> is the name of the tool in the context You can configure the tools in this way: tool.<id>.<parameter> = <value> So if you find "global", "request", "session" or "persistent" as second ...
BaseSql: This class contains default methods to construct SQL statements using method calls. Subclasses should specialize the methods to the SQL dialect of a specific database. This class defines methods that construct String fragments of SQL statements. Chaining the methods allows the creation of arbitrarily complex statements. getInsert --> insert into left ( item1 ,..., itemN ) getValues --> values ( item1 ,..., itemN ) getUpdate --> update left item1 ,..., itemN getSet --> set left = right getDelete --> delete from left getSelect --> select item1 ,..., itemN getSelectDistinct --> select distinct item1 ...
HtmlPageAttributes: Template context tool that can be used to set various attributes of a HTML page. This tool does not automatically make the changes in the HTML page for you. You must use this tool in your layout template to retrieve the attributes. The set/add methods are can be used from a screen template, action, screen class, layour template, or anywhere else. The get methods should be used in your layout template(s) to construct the appropriate HTML tags. Example usage of this tool to build the HEAD and BODY tags in your layout templates: ## Set defaults for all pages using this layout. Anything set here can ...
Sql: This interface defines methods to construct String fragments of SQL statements. BaseSql provides a base implementation of this interface. Chaining the methods allows the creation of arbitrarily complex statements. getInsert --> insert into left ( item1 ,..., itemN ) getValues --> values ( item1 ,..., itemN ) getUpdate --> update left item1 ,..., itemN getSet --> set left = right getDelete --> delete from left getSelect --> select item1 , item2 ,..., itemN getFrom --> from item1 , item2 ,..., itemN getWhere --> where tree getEqual --> ( left = right ) getNotEqual --> ( left != right ) getGreaterThan ...
VelocityEmail: This is a simple class for sending email from within Velocity. Essentially, the body of the email is processed with a Velocity Context object. The beauty of this is that you can send email from within your Velocity template or from your business logic in your Java code. The body of the email is just a Velocity template so you can use all the template functionality of Velocity within your emails! Example Usage (This all needs to be on one line in your template): Setup your context: context.put ("VelocityEmail", new VelocityEmail() ); Then, in your template: $VelocityEmail.setTo("Jon Stevens", "jon@latchkey.com") ...
MultipartStream: This class can be used to process data streams conforming to MIME 'multipart' format as defined in RFC 1251 . Arbitrary large amouns of data in the stream can be processed under constant memory usage. The format of the stream is defined in the following way: multipart-body := preamble 1*encapsulation close-delimiter epilogue encapsulation := delimiter body CRLF delimiter := "--" boundary CRLF close-delimiter := "--" boudary "--" preamble := <ignore> epilogue := <ignore> body := header-part CRLF body-part header-part := 1*header CRLF header := header-name ":" header-value header-name ...
TurbineException: The base class of all exceptions thrown by Turbine. It is intended to ease the debugging by carrying on the information about the exception which was caught and provoked throwing the current exception. Catching and rethrowing may occur multiple times, and provided that all exceptions except the first one are descendands of TurbineException , when the exception is finally printed out using any of the printStackTrace() methods, the stacktrace will contain the information about all exceptions thrown and caught on the way. Running the following program 1 import org.apache.turbine.util.TurbineException; ...
DefaultPage: When building sites using templates, Screens need only be defined for templates which require dynamic (database or object) data. This page can be used on sites where the number of Screens can be much less than the number of templates. The templates can be grouped in directories with common layouts. Screen modules are then expected to be placed in packages corresponding with the templates' directories and follow a specific naming scheme. The template parameter is parsed and and a Screen whose package matches the templates path and shares the same name minus any extension and beginning with a capital ...
TemplatePage: When building sites using templates, Screens need only be defined for templates which require dynamic (database or object) data. This page can be used on sites where the number of Screens can be much less than the number of templates. The templates can be grouped in directories with common layouts. Screen modules are then expected to be placed in packages corresponding with the templates' directories and follow a specific naming scheme. The template parameter is parsed and and a Screen whose package matches the templates path and shares the same name minus any extension and beginning with a capital ...
VelocityHtmlEmail: This is a simple class for sending html email from within Velocity. Essentially, the bodies (text and html) of the email are a Velocity Context objects. The beauty of this is that you can send email from within your Velocity template or from your business logic in your Java code. The body of the email is just a Velocity template so you can use all the template functionality of Velocity within your emails! This class allows you to send HTML email with embedded content and/or with attachments. You can access the VelocityHtmlEmail instance within your templates trough the $mail Velocity variable. ...
UserPeerManagerConstants: Constants for configuring the various columns and bean properties for the used peer. Default is: security.torque.userPeer.class = org.apache.turbine.services.security.torque.om.TurbineUserPeer security.torque.userPeer.column.name = LOGIN_NAME security.torque.userPeer.column.id = USER_ID security.torque.userPeer.column.password = PASSWORD_VALUE security.torque.userPeer.column.firstname = FIRST_NAME security.torque.userPeer.column.lastname = LAST_NAME security.torque.userPeer.column.email = EMAIL security.torque.userPeer.column.confirm = CONFIRM_VALUE security.torque.userPeer.column.createdate = ...
TurbineNonPersistentSchedulerService: Service for a cron like scheduler that uses the TurbineResources.properties file instead of the database. The methods that operate on jobs ( get,add,update,remove ) only operate on the queue in memory and changes are not reflected to the properties file which was used to initilize the jobs. An example is given below. The job names are the class names that extend ScheduledJob. services.SchedulerService.scheduler.jobs=scheduledJobName,scheduledJobName2 services.SchedulerService.scheduler.job.scheduledJobName.ID=1 services.SchedulerService.scheduler.job.scheduledJobName.SECOND=-1 services.SchedulerService.scheduler.job.scheduledJobName.MINUTE=-1 ...
UIManager: UIManager.java Manages all UI elements for a Turbine Application. Any UI element can be accessed in any template using the $ui handle (assuming you use the default PullService configuration). So, for example, you could access the background colour for your pages by using $ui.bgcolor Questions: What is the best way to allow an application to be skinned. And how to allow the flexible altering of a particular UI element in certain parts of the template hierarchy. For example on one section of your site you might like a certain bgcolor, on another part of your site you might want another. How can be ...
SelectorBox: This class is for generating a SelectorBox. It is good when used with WM because you can stuff it into the context and then just call it to generate the HTML. It can be used in other cases as well, but WM is the best case for it right now. For example code showing the usage for this module, please see the toString() method below to see how it would be refered to from WM. // get the roles for a user RoleSet userRoles = new DefaultAccessControl().getRoles(loginid, null); if ( userRoles != null ) { context.put("hasRoleSet", Boolean.TRUE); // get an array of the users roles Role[] usersRoles = userRoles.getRolesArray(); ...
FileItem: This class represents a file that was received by Turbine using multipart/form-data POST request. After retrieving an instance of this class from the ParameterParser (see ParameterParser.getFileItem(String) 55 and ParameterParser.getFileItems(String) 55 ) you can use it to acces the data that was sent by the browser. You may either request all contents of file at once using get() 55 or request an InputStream with getStream() 55 and process the file without attempting to load it into memory, which may come handy with large files. Implements the javax.activation.DataSource interface (which allows ...
IDBroker: This method of ID generation is used to ensure that code is more database independent. For example, MySQL has an auto-increment feature while Oracle uses sequences. It caches several ids to avoid needing a Connection for every request. This class uses the table ID_TABLE defined in conf/master/id-table-schema.xml. The columns in ID_TABLE are used as follows: ID_TABLE_ID - The PK for this row (any unique int). TABLE_NAME - The name of the table you want ids for. NEXT_ID - The next id returned by IDBroker when it queries the database (not when it returns an id from memory). QUANTITY - The number of ...
ActionEvent: This is an alternative to the Action class that allows you to do event based actions. Essentially, you label all your submit buttons with the prefix of "eventSubmit_" and the suffix of "methodName". For example, "eventSubmit_doDelete". Then any class that subclasses this class will get its "doDelete(RunData data)" method executed. If for any reason, it was not able to execute the method, it will fall back to executing the doPeform() method which is required to be implemented. Limitations: Because ParameterParser makes all the key values lowercase, we have to do some work to format the string into ...
TurbineGlobalCacheService: This Service functions as a Global Cache. A global cache is a good place to store items that you may need to access often but don't necessarily need (or want) to fetch from the database everytime. A good example would be a look up table of States that you store in a database and use throughout your application. Since information about States doesn't change very often, you could store this information in the Global Cache and decrease the overhead of hitting the database everytime you need State information. The following properties are needed to configure this service: services.GlobalCacheService.classname=org.apache.turbine.services.cache.TurbineGlobalCacheService ...
UUIdGenerator: This class generates universally unique id's in the form of a String. The id has three parts. The first is supposed to be location dependent. The preferred location parameter is an ethernet (MAC) address, but an IP can be used as well. if none is supplied a Math.random generated number will be used. This part of the key will be 48 bits in length. The second part of the key is time related and will be the lower 48 bits of the long used to signify the time since Jan. 1, 1970. This will cause key rollover in the year 6429. The preceding 12 bytes are Base64 encoded with the characters / and * replaced ...
TurbineUploadService: This class is an implementation of UploadService . Files will be stored in temporary disk storage on in memory, depending on request size, and will be available from the org.apache.turbine.util.parser.ParameterParser as org.apache.commons.fileupload.FileItem s. This implementation of UploadService handles multiple files per single html widget, sent using multipar/mixed encoding type, as specified by RFC 1867. Use ParameterParser.getFileItems(String) > ParameterParser.getFileItems(String) 55 to acquire an array of org.apache.commons.fileupload.FileItem s associated with given html widget.
TimeSelector: TimeSelector is a utility class to handle the creation of a set of time drop-down menus. The code is broken into a set of static methods for quick and easy access to the individual select objects: ElementContainer ec timeSelect = new ElementContainer(); String myName = "mytime"; ec.addElement(TimeSelector.getHourSelector(myName)); ec.addElement(TimeSelector.getMinuteSelector(myName)); ec.addElement(TimeSelector.getAMPMSelector(myName)); There are also methods which will use attributes to build a complete time selector in the default 12hr format (eg HH:MM am/pm): TimeSelector ts = new TimeSelector(myName); ...
MailMessage: Creates a very simple text/plain message and sends it. MailMessage creates a very simple text/plain message and sends it. It can be used like this: MailMessage sm = new MailMessage("mail.domain.net", "toYou@domain.net", "fromMe@domain", "this is the subject", "this is the body"); Another example is: MailMessage sm = new MailMessage(); sm.setHost("mail.domain.net"); sm.setHeaders("X-Mailer: Sendmail class, X-Priority: 1(Highest)"); sm.setFrom("Net Freak1 user1@domain.com"); sm.setReplyTo("Net Freak8 user8@domain.com"); sm.setTo("Net Freak2 user2@domain.com, Net Freak3 user3@domain.com"); sm.setCc("Net ...
Turbine: Turbine is the main servlet for the entire system. It is final because you should not ever need to subclass this servlet. If you need to perform initialization of a service, then you should implement the Services API and let your code be initialized by it. If you need to override something in the doGet() or doPost() methods, edit the TurbineResources.properties file and specify your own classes there. Turbine servlet recognizes the following initialization parameters. properties the path to TurbineResources.properties file used by the default implementation of ResourceService , relative to the ...
TurbineXmlConfig: A class used for initialization of Turbine without a servlet container. If you need to use Turbine outside of a servlet container, you can use this class for initialization of the Turbine servlet. TurbineXmlConfig config = new TurbineXmlConfig(".", "conf/TurbineResources.properties"); All paths referenced in TurbineResources.properties and the path to the properties file itself (the second argument) will be resolved relative to the directory given as the first argument of the constructor, here - the directory where application was started. Don't worry about discarding the references to objects ...
| Home | Contact Us | Privacy Policy | Terms of Service |