public class JahiaTemplatesPackage extends Object
| Modifier and Type | Class and Description |
|---|---|
static interface |
JahiaTemplatesPackage.ContextInitializedCallback
Callback object to do operations just after the initialization of the spring context
|
| Modifier and Type | Field and Description |
|---|---|
static String |
ID_DEFAULT
The ID of the default module.
|
static String |
NAME_DEFAULT
The name of the default module.
|
| Constructor and Description |
|---|
JahiaTemplatesPackage(org.osgi.framework.Bundle bundle)
Initializes an instance of this class.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addDependency(JahiaTemplatesPackage dep)
Add the provided module into the list of dependencies for this one.
|
void |
addInitialImport(String initImport) |
void |
clearHierarchy()
Resets the resource bundle lookup hierarchy.
|
void |
doExecuteAfterContextInitialized(JahiaTemplatesPackage.ContextInitializedCallback contextInitializedCallback)
Provide a callback that will be execute when the Spring context is ready for this bundle
if the context is already set, the callback is executed directly
if no context available, the callback is stored and will be execute when a context is set for the current JahiaTemplatePackage
the callback is removed when executed
|
boolean |
equals(Object o) |
String |
getAutoDeployOnSite()
Returns the value for the
autoDeployOnSite directive which defines on which sites this module should be automatically
installed. |
long |
getBuildNumber()
Deprecated.
with no replacement
|
org.osgi.framework.Bundle |
getBundle()
Returns the backing OSGi bundle for this module.
|
String |
getBundleKey()
Returns unique bundle key which corresponds to this module, including group ID, bundle symbolic name and version.
|
ClassLoader |
getChainedClassLoader()
Returns a class loader which is a chain of class loaders, starting from the Web application one, then this modules class loader and
at the end the list of class loaders of modules this module depends on.
|
ClassLoader |
getClassLoader()
Returns the module bundle's class loader instance.
|
org.springframework.context.support.AbstractApplicationContext |
getContext()
Returns the Spring application context instance for this module.
|
List<String> |
getDefinitionsFiles()
Returns a list of content node definition files (CND) available in the module.
|
List<JahiaTemplatesPackage> |
getDependencies()
Returns a read-only list of modules which this module depends on.
|
Set<JahiaTemplatesPackage> |
getDependentModulesWithVersion() |
List<String> |
getDepends()
Returns the name of the parent template package.
|
String |
getDescription()
Returns the description of this module is available.
|
String |
getFilePath()
Get the file path.
|
String |
getForgeUrl()
Returns the URL of the corresponding Jahia Private App Store.
|
String |
getGroupId() |
String |
getId()
Return the module Id.
|
String |
getIdWithVersion()
Return the module Id concatenated with it version
|
List<String> |
getInitialImports() |
Set<JahiaTemplatesPackage> |
getModuleDependenciesWithVersion() |
int |
getModulePriority()
Return the module priority, used for views and resource resolution.
|
String |
getModuleType()
Returns the type of this module.
|
String |
getName()
Return the template name.
|
String |
getProvider()
Return the provider name.
|
org.springframework.core.io.Resource |
getResource(String relativePath)
Returns a resource from the module's bundle for the specified path.
|
List<String> |
getResourceBundleHierarchy()
Returns a list with the resource bundle lookup chain for this module.
|
String |
getResourceBundleName()
Returns the name (path) of the resource bundle for this module.
|
org.springframework.core.io.Resource[] |
getResources(String relativePath)
Returns resources from the module's bundle and its attached fragments for the specified path.
|
String |
getRootFolder()
Deprecated.
use
getId() instead |
String |
getRootFolderPath()
Returns the source path of the root folder for the deployed template set.
|
String |
getRootFolderWithVersion()
Deprecated.
use
getIdWithVersion() instead |
List<String> |
getRulesDescriptorFiles()
Returns a list with the rule DSL files for this module.
|
List<String> |
getRulesFiles()
Returns a list of rule files available in the module.
|
String |
getScmTag()
Returns the SCM tag of this module if it's released
|
String |
getScmURI()
Returns an SCM URI for this module if the source control is available for it.
|
SourceControlManagement |
getSourceControl()
Returns an instance of the
SourceControlManagement for this module. |
File |
getSourcesFolder()
Returns the file descriptor, representing the folder with the sources for this module if available.
|
ModuleState |
getState()
Retrieves the module state information.
|
String |
getThumbnail()
Return the thumbnail file name.
|
ModuleVersion |
getVersion()
Returns the version information for this module.
|
int |
hashCode() |
boolean |
isActiveVersion()
Checks if this is the version of the module which is currently active.
|
boolean |
isDefault()
Returns
true if this package is the default template set. |
boolean |
isEditModeBlocked() |
boolean |
isLastVersion()
Checks if this is the latest available version of this module.
|
boolean |
isServiceInitialized()
Returns
true if the Spring beans, implementing JahiaAfterInitializationService, were already initialized. |
boolean |
isSourcesDownloadable()
Checks if the sources for this module can be downloaded.
|
void |
resetDependencies()
Reset the module dependencies.
|
boolean |
resourceExists(String relativePath)
Checks if the specified resource is present in the module's bundle.
|
void |
setActiveVersion(boolean activeVersion)
Sets the active state of this module version.
|
void |
setAutoDeployOnSite(String autoDeployOnSite)
Sets the value for the
autoDeployOnSite directive which defines on which sites this module should be automatically
installed. |
void |
setBuildNumber(long buildNumber)
Deprecated.
with no replacement
|
void |
setClassLoader(ClassLoader classLoader)
Sets the class loader instance for this module
|
void |
setContext(org.springframework.context.support.AbstractApplicationContext context)
Sets the application context instance for this module.
|
void |
setDefinitionsFile(String definitionFile)
Sets the list of content node definition files (CND) available in the module.
|
void |
setDepends(String dep)
Sets the name of the parent template package.
|
void |
setDescription(String description)
Sets the description for this module.
|
void |
setEditModeBlocked(boolean editModeBlocked) |
void |
setFilePath(String path)
Set the file path.
|
void |
setForgeUrl(String forgeUrl)
Sets the URL of the corresponding Jahia Private App Store.
|
void |
setGroupId(String groupId) |
void |
setId(String moduleId)
Set the module Id.
|
void |
setLastVersion(boolean lastVersion)
Sets the flag for the latest available module version.
|
void |
setModulePriority(int modulePriority)
Set the module priority for this module
|
void |
setModuleType(String moduleType)
Sets the type of this module.
|
void |
setName(String name)
Set the name.
|
void |
setProvider(String provider)
Set the Provider.
|
void |
setResourceBundleName(String resourceBundleName)
Sets the resource bundle name (path) for this module.
|
void |
setRootFolder(String moduleId)
Deprecated.
use
setId(String) instead |
void |
setRootFolderPath(String rootFolderPath)
Sets the root path for the module folder.
|
void |
setRulesDescriptorFile(String rulesDescriptorFiles)
Sets the list with the rule DSL files for this module.
|
void |
setRulesFile(String rulesFile)
Sets a list of rule files available in the module.
|
void |
setScmTag(String scmTag)
Set the SCM tag of this module if it's released
|
void |
setScmURI(String scmURI)
Sets the SCM URI for this module if the source control is available for it.
|
void |
setServiceInitialized(boolean serviceInitialized)
Set this to
true to indicate that the Spring beans, implementing JahiaAfterInitializationService, were already
initialized. |
void |
setSourceControl(SourceControlManagement sourceControl)
Sets an instance of the source control management for this module.
|
void |
setSourcesDownloadable(boolean sourcesDownloadable)
Sets the flag for downloadable sources.
|
void |
setSourcesFolder(File sourcesFolder)
Sets the file descriptor, representing the folder with the sources for this module if available.
|
void |
setState(ModuleState state)
Sets the module state information.
|
void |
setThumbnail(String val)
Set the thumbnail file name.
|
void |
setVersion(ModuleVersion version)
Sets the version information for this module.
|
String |
toString() |
public static final String ID_DEFAULT
public static final String NAME_DEFAULT
public JahiaTemplatesPackage(org.osgi.framework.Bundle bundle)
bundle - the backing OSGi bundle for this modulepublic org.osgi.framework.Bundle getBundle()
public ModuleState getState()
public void setState(ModuleState state)
state - the module state informationpublic String getName()
public void setName(String name)
name - the name of the templatepublic String getRootFolder()
getId() insteadpublic String getId()
public String getRootFolderWithVersion()
getIdWithVersion() insteadpublic String getIdWithVersion()
public void setRootFolder(String moduleId)
setId(String) insteadmoduleId - the module Idpublic void setId(String moduleId)
moduleId - the module Idpublic String getGroupId()
public void setGroupId(String groupId)
public String getProvider()
public void setProvider(String provider)
provider - the name of the Providerpublic String getThumbnail()
public void setThumbnail(String val)
val - the file namepublic String getFilePath()
public void setFilePath(String path)
public boolean isDefault()
true if this package is the default template set.true if this package is the default template setpublic void addInitialImport(String initImport)
public List<String> getDepends()
public void setDepends(String dep)
dep - name of the parent template packagepublic String getRootFolderPath()
public String getDescription()
public void setDescription(String description)
description - the description textpublic String getResourceBundleName()
public void setResourceBundleName(String resourceBundleName)
resourceBundleName - the resource bundle name (path) for this modulepublic List<String> getDefinitionsFiles()
public void setDefinitionsFile(String definitionFile)
definitionFile - the list of content node definition files (CND) available in the modulepublic List<String> getRulesFiles()
public void setRulesFile(String rulesFile)
rulesFile - a list of rule files available in the modulepublic List<String> getResourceBundleHierarchy()
public void clearHierarchy()
public List<String> getRulesDescriptorFiles()
public void setRulesDescriptorFile(String rulesDescriptorFiles)
rulesDescriptorFiles - a list with the rule DSL files for this modulepublic List<JahiaTemplatesPackage> getDependencies()
public void addDependency(JahiaTemplatesPackage dep)
dep - a module to add as a dependency for this modulepublic void resetDependencies()
@Deprecated public long getBuildNumber()
@Deprecated public void setBuildNumber(long buildNumber)
public ModuleVersion getVersion()
public void setVersion(ModuleVersion version)
version - the version information for this modulepublic int getModulePriority()
public void setModulePriority(int modulePriority)
modulePriority - public String getModuleType()
public void setModuleType(String moduleType)
moduleType - the type of this modulepublic void setAutoDeployOnSite(String autoDeployOnSite)
autoDeployOnSite directive which defines on which sites this module should be automatically
installed.autoDeployOnSite - the value for the autoDeployOnSite directive which defines on which sites this module should be automatically
installedpublic String getAutoDeployOnSite()
autoDeployOnSite directive which defines on which sites this module should be automatically
installed.autoDeployOnSite directive which defines on which sites this module should be automatically
installedpublic org.springframework.context.support.AbstractApplicationContext getContext()
null in case this module has no application context
provided.null in case this module has no application context
providedpublic void setContext(org.springframework.context.support.AbstractApplicationContext context)
context - the application context instance for this modulepublic boolean isActiveVersion()
true if this version of the module is currently active.public void setActiveVersion(boolean activeVersion)
activeVersion - the active state of this module versionpublic boolean isLastVersion()
true if this is the latest version of this modulepublic void setLastVersion(boolean lastVersion)
lastVersion - the flag for the latest available module versionpublic String getScmURI()
public void setScmURI(String scmURI)
scmURI - the SCM URI for this module if the source control is available for itpublic String getScmTag()
public void setScmTag(String scmTag)
public File getSourcesFolder()
public void setSourcesFolder(File sourcesFolder)
sourcesFolder - the file descriptor, representing the folder with the sources for this module if availablepublic SourceControlManagement getSourceControl()
SourceControlManagement for this module.SourceControlManagement for this modulepublic void setSourceControl(SourceControlManagement sourceControl) throws IOException
sourceControl - an instance of the source control management for this moduleIOException - in case of an exception when retrieving SCM URLpublic org.springframework.core.io.Resource getResource(String relativePath)
relativePath - a path of the bundle resourceBundle.getEntry(String)public boolean resourceExists(String relativePath)
relativePath - a path of the bundle resourcetrue if the specified resource is present in the module's bundle; false otherwiseBundle.getEntry(String)public org.springframework.core.io.Resource[] getResources(String relativePath)
relativePath - a path of the bundle resourceBundle.findEntries(String, String, boolean)public ClassLoader getClassLoader()
public void setClassLoader(ClassLoader classLoader)
classLoader - a class loader instance for this modulepublic ClassLoader getChainedClassLoader()
public void setRootFolderPath(String rootFolderPath)
rootFolderPath - the root path for the module folderpublic boolean isServiceInitialized()
true if the Spring beans, implementing JahiaAfterInitializationService, were already initialized.public void setServiceInitialized(boolean serviceInitialized)
true to indicate that the Spring beans, implementing JahiaAfterInitializationService, were already
initialized.serviceInitialized - the state of the service initializationpublic void setSourcesDownloadable(boolean sourcesDownloadable)
sourcesDownloadable - value of the flag for downloadable sourcespublic boolean isSourcesDownloadable()
true if the sources for this module can be downloaded; false otherwisepublic String getForgeUrl()
public void setForgeUrl(String forgeUrl)
forgeUrl - the URL of the corresponding Jahia Private App Storepublic boolean isEditModeBlocked()
public void setEditModeBlocked(boolean editModeBlocked)
public void doExecuteAfterContextInitialized(JahiaTemplatesPackage.ContextInitializedCallback contextInitializedCallback)
contextInitializedCallback - the callbackpublic String getBundleKey()
BundleInfopublic Set<JahiaTemplatesPackage> getModuleDependenciesWithVersion()
public Set<JahiaTemplatesPackage> getDependentModulesWithVersion()
Copyright © 2004–2020 Jahia Solutions Group SA. All rights reserved.