Components
Components are installable parts of an application (through modules), or even a complete application, that can contain:
- Services
- Themes
- Business contexts
- Observers
- Public files
- Structure
A component must necessarily belong to a module. Given a structure of folders and files belonging to a given module, a component is marked by a component definition file. The entire tree from the folder containing the file belongs to this component, except for the subfolders that also contain component definition files. In this latter case, another component is defined.
Public Files
A component can have public files (such as images, CSS, javascripts, etc.) that will be distributed across the static directories of the portal's websites. The public files of a component must necessarily be in a folder called componentfiles/www, within the same folder that contains the definition of the component. If the publicFilesChannelId element is specified with a channel identifier, the public files of the component will be copied only to the website of the specified channel; otherwise, these files will be distributed across all public directories of the existing websites in the portal and will be maintained in the portal when a change in the portal's websites or a change in the portal's components is made.
Channel Structure
A component can have a channel structure that will be imported during the deployment of the component. The channel structure of a component must necessarily be in a folder called componentfiles/structure, within the same folder that contains the definition of the component. These files will be used to import the structure of the component when it is registered. For details on how to create the structure of a component, see the section Creating the structure of a component.
Services
A component can have services that will be available through the portal while the component is available. The services can be located anywhere in the folder tree of the component, except in the componentfiles/www and componentfiles/structure folders, which belong to the public files and channel structure, respectively.
Themes
A component can have themes that will be available through the portal while the component is available. The themes can be located anywhere in the folder tree of the component, except in the componentfiles/www and componentfiles/structure folders, which belong to the public files and channel structure, respectively.
Business Contexts
A component can have business contexts that will be available through the portal while the component is available. The business contexts can be located anywhere in the folder tree of the component, except in the componentfiles/www and componentfiles/structure folders, which belong to the public files and channel structure, respectively.
Observers
A component can contain observers that will be automatically registered during deployment and unregistered during undeployment. The business contexts can be located anywhere in the folder tree of the component.
Resource Availability of a Component
The resources of a component are maintained while the component exists in the portal. The portal will make the necessary resource changes when there are changes (inclusions, updates, and deletions) of components.
Component Version
The version of a component must be declared in its definition file. It is important to note that a component with a lower version cannot be installed in an environment with a higher version (the portal does not allow downgrading a component).
Component Identifier
The identifier of a component is implicitly calculated and cannot be manually defined. The identifier is obtained from the folder that contains the component definition file. The identifier is the complete path of that folder within the module, replacing the path separator ("\" or "/", depending on the type of module and the operating system) with the character ".".
Example: if a component belongs to a JAR module and is located in the folder br/com/lumis/intranet, that is, its definition file is br/com/lumis/intranet/componentdefinition.xml, the identifier of this component will be br.com.lumis.intranet.
Component Deployment Scripts
A component can include scripts to provide installation, update, and uninstallation steps. The portal will decide which script to use, according to the user's operation and the current state of the component, and which parts of that same script will be executed.
For more information about scripts, see the section Installation, update, and uninstallation scripts.
Installation Restrictions
A component can define installation restrictions. These restrictions will be validated every time a deploy or undeploy is performed.
For more information about restrictions, see the section Installation restrictions.
Component Replacement
A component can replace one or more components. To do so, the portal uses a component replacement mechanism, described in the section Component Replacement.
For examples of creating components, see the section Examples.