These are the essential interfaces and classes in the Magnolia API. See also full API Javadoc.
- App: Main interface for apps. Apps are started and managed by the AppController.
- AppDescriptor: Describes an app.
- SubApp: Represents a view open in a tab within an app.
- SubAppDescriptor. Describes a subapp.
- AppContext. Provides functionality used by an app to interact with the Magnolia shell.
sendLocalMessage(Message message). Sends a message to the current user.
sendUserMessage(String user, Message message). Sends a message to a named user.
broadcastMessage(Message message). Sends a message to all users.
- SubAppContext. Provides functionality used by a sub app to interact with the Magnolia shell.
- ContentApp. Extends the BaseApp by the ability to open a choose dialog.
- BrowserSubApp. Base implementation of a content subApp.
- BrowserSubAppDescriptor. Describes a browser subapp.
- DetailSubApp. Base implementation of an item subApp.
- DetailSubAppDescriptor. Descriptor for Item subApps. Holds the form definition to build a form and needed fields to create a new node.
The UI Framework is a collection of components for building the user interface in apps.
- UiContext. Represents a UI context and allows components, views and presenters to interact with the context that contains them.
- WorkbenchDefinition. Defines a workbench. Contains all elements which define a workbench configuration.
- WorkbenchView. Displays a workbench.
- TreePresenter. Responsible for creating, configuring and updating a tree of items according to the workbench definition.
- ListPresenter. Responsible for creating, configuring and updating a list of items according to the workbench definition.
- ThumbnailPresenter. Responsible for creating, configuring and updating a thumbnail grid of items according to the workbench definition.
- ColumnDefinition. Defines a column in a workbench.
- ColumnFormatter. Defines how a column's value is displayed in the UI.
- Action. An action is executed in response to user interaction with the UI. For instance clicking on an item in a menu.
- ActionDefinition. Action definitions are used to configure actions in many parts of the UI. The definition holds a name which is used to identify the action within a certain scope, for instance within a sub app.
- ActionbarDefinition. The definition for an action bar, made of sections and groups of actions.
FormDefinition. Defines a form.
- TabDefinition. Defines a tab within a form. Holds a list of fields contained in this tab.
- FieldDefinition. Defines a field within a dialog.
- FieldFactory. Responsible for creating Vaadin fields based on their
- FieldValidatorDefinition. Defines a validator for field values.
Location and navigation
- Location. Represents a location within the application, such as the open view and the selected item.
- LocationController. Manages the user's location in the application and controls location changes.
- Shell. Decouples the presenters and the Vaadin application. Provides methods to show messages and configuration dialogs.
- Message. Models a message.
- MessagesManager. Manages user messages.
- EventBus. Fires events to a set of registered handlers.
- ContentChangedEvent. Event fired when content is changed in a workspace. Holds an itemId of an item that is related to the changes made. If the change was a deletion the itemId is the parent of the deleted item. If something was added the itemId is for the new item.
Context is an abstraction layer representing the environment of the current process which can be a request process, a scheduled task or a command execution in the workflow. The context provides access to the most important components such as hierarchy managers jcr session, current user, context attributes and parameters, response object and so on. The context is initialized at the beginning of each process. Context attributes will have a different meaning based on the environment. In case of a request, the attributes are request attributes and request parameters. Magnolia implements context using a thread-local class.
- MgnlContext. This static helper class is the programmer's entry point to work with the current context.
getInstance()Returns the current context.
getUser()Returns the current user.
getJCRSession(String workspacename). Returns a JCR session to the provided workspace.
getAttribute(name)Returns a named context attribute. In case of a request, this can be a request parameter, request attribute or session attribute.
getWebContext()Returns the Web context if the current thread is processing a request.
- WebContext. Context interface specialized for servlet requests; knows about HttpServletRequest and HttpServletResponse. Should be used as little as possible as it makes the calling code dependent on the servlet API. Use MgnlContext instead if possible.
getRequest()Returns the current servlet request object.
getResponse()Returns the current servlet response object.
- AggregationState. Contains information about the current request and rendering process. It is mostly initialized by the Aggregator filter.
getOriginalURI()Original URI is the URI as requested by the client.
getCurrentURI()URI as mapped by Magnolia at a given point in processing. This value is for instance changed by the i18n filter, virtual URI mapping etc.
getMainContentNode()The content with which we start the rendering process. In general this is the page node.
getCurrentContentNode()The content that is processed at the moment. First this is typically the page, then a component and so on.
Rendering and templating
- RenderingEngine. Entry point for the rendering.
render(javax.jcr.Node content, OutputProvider out)Renders the content with its assigned template.
render(javax.jcr.Node content, RenderableDefinition definition, Map<String,Object> contextObjects, OutputProvider out)Uses a specific RenderableDefinition to render the content and exposes the given context objects to the template script.
- RenderableDefinition. Abstract rendering definition used for templates and components.
getName()Name of the template definition.
getRenderType()Defines the renderer to use. For instance JSP or Freemarker.
- TemplateDefinition. A
RenderableDefinitionwhich supports editing in the page editor and can define their areas.
- RenderingModel. The model used in the rendering process. It is instantiated for each rendering and ties the current content and rendering definition together. Concrete classes provide helper methods used in the template script. The
executemethod is executed before the rendering starts, a useful place to execute any business logic. The model is available in the template script under the named model.
getParent()Parent model. Most often the model of the page rendering.
getNode()The content node tied to this model.
getContent()Map representation of the content node tied to this model.
getDefinition()The renderable (template, area or component) tied to this model.
execute()Called after all properties were set.
- Renderer. Responsible for generating the actual response from request data and a template. A typical JSP implementation will simply forward the request to the JSP through request dispatcher. You can bind a specific implementation to a template type.
render(RenderingContext ctx, Map<String,Object> contextObjects)Called by
RenderingEngineafter it has setup the
- RenderingContext. Provides all information needed in the rendering process.
- ContentMap. Map based representation of JCR content. This class is used in template scripts to allow notations like
content.<property name>. It first tries to read a property with name (key) and, if not present, checks for the presence of a child node. Special property names map to JCR methods:
- Templating functions
- TemplatingFunctions. An object that exposes methods useful for templates. The object is exposed to template scripts as
- LinkUtil. Utility methods for link transformations and handling.
makePathRelative(String url, String absolutePath)
- Site. Site configuration Java bean. Default site configuration merged with the user-defined site.
- MgnlFilter. Interface for filters managed by Magnolia, exposing support for the bypass mechanism.
- AbstractMgnlFilter. A Magnolia filter configured in the
configrepository. This filter is bypassable.
- ModuleRegistry. Holds instances and definitions of modules.
- ModuleVersionHandler. Provides deltas to be applied to install/update/uninstall modules. A module that needs to handle its own install/updates should provide an implementation of this interface.
- ModuleLifecycle. Manages the lifecyle of an installed instance of a Magnolia Module. Implementing this interface is optional.
getNode(java.lang.String absPath). Returns the node at the specified absolute path in the workspace.
getNodeByIdentifier(java.lang.String id)Returns the node specified by the given identifier.
save(). Validates all pending changes currently recorded in this Session.
- Node. Represents a node in the repository.
getNode(java.lang.String relPath). Returns the node at
relPathrelative to this node.
getNodes()Returns all child nodes of this node accessible through the current
getNodes(java.lang.String namePattern)Gets all child nodes of this node accessible through the current
getProperty(java.lang.String relPath)Returns the property at relPath relative to this node.
setProperty(java.lang.String name, Value value)Sets the single-value property of this node called name to the specified value.
- Property. A
Propertyobject represents the smallest granularity of content storage.
- NodeUtil. Utility methods to collect data from JCR repository.
- PropertyUtil. Property-related utility methods.
- SessionUtil. Session-related utility methods.
- NodeBuilder. Entry point for using the node builder API. Also see the NodeBuilderTask and ModuleNodeBuilderTask classes for usage of the node builder API in ModuleVersionHandler.
- ContentDecorator. Applies custom behavior in a graph of JCR objects by wrapping objects. Allows for expressing the logic in a single place.
- NodeTypes. Magnolia-defined node types and their properties and convenience methods.
getCreated(javax.jcr.Node node)Returns the creation date of a node or null if creation date isn't set.
- Node2BeanProcessor. Transforms nodes to beans or maps. The transformer is use to resolve classes or to instantiate beans.
- Node2BeanTransformer. Contract for transformation from node to java beans.