/** * @see java.lang.Object#clone() */ @Override public Object clone() { return new CmsModuleDependency(m_name, new CmsModuleVersion(m_version.getVersion())); }
/** * Will be called by the digester if a module was imported.<p> * * @param moduleHandler contains the imported module */ public void setModule(CmsModuleXmlHandler moduleHandler) { m_importedModule = moduleHandler.getModule(); }
/** * @see java.lang.Object#toString() */ @Override public String toString() { return getVersion(); }
/** * Gets the module configuration path.<p> * * @return the module configuration path */ public String getConfigurationPath() { String parameter = getParameter("config.sitemap"); if (parameter != null) { return parameter; } else { return "/system/modules/" + getName() + "/.config"; } }
/** * Checks if the categoryfolder setting needs to be updated. * * @return true if the categoryfolder setting needs to be updated */ public boolean needToSetCategoryFolder() { if (m_adeModuleVersion == null) { return true; } CmsModuleVersion categoryFolderUpdateVersion = new CmsModuleVersion("9.0.0"); return (m_adeModuleVersion.compareTo(categoryFolderUpdateVersion) == -1); }
/** * Sets the date created of this module.<p> * * * <i>Please note:</i>It's not possible to set the module date created once the module * configuration has been frozen.<p> * * @param value the date created to set */ public void setDateCreated(long value) { checkFrozen(); m_dateCreated = value; }
/** * Gets the virtual file name to use for the given module.<p> * * @param module the module for which to get the file name * * @return the file name */ private String getFileNameForModule(CmsModule module) { return module.getName() + SUFFIX; }
/** * @see org.opencms.module.A_CmsModuleAction#initialize(org.opencms.file.CmsObject, org.opencms.configuration.CmsConfigurationManager, org.opencms.module.CmsModule) */ @Override public void initialize(CmsObject adminCms, CmsConfigurationManager configurationManager, CmsModule module) { super.initialize(adminCms, configurationManager, module); // set the CmsObject initialized as an administrator at the only existing instance m_cmsAdmin = adminCms; m_instance = this; } }
/** * Creates a new, empty CmsModule object.<p> */ public CmsModule() { m_version = new CmsModuleVersion(CmsModuleVersion.DEFAULT_VERSION); m_resources = Collections.EMPTY_LIST; m_exportPoints = Collections.EMPTY_LIST; m_dependencies = Collections.EMPTY_LIST; }
/** * Creates a new module version based on a String.<p> * * @param version the version to set */ public CmsModuleVersion(String version) { setVersion(version); }
/** Checks, if the module should use the reduced export mode. * @return if reduce export mode should be used <code>true</code>, otherwise <code>false</code>. */ public boolean isReducedExportMode() { return ExportMode.REDUCED.equals(m_exportMode); }
/** * Sets the list of module dependencies.<p> * * @param dependencies list of module dependencies */ public void setDependencies(List dependencies) { checkFrozen(); m_dependencies = dependencies; }
/** * Will be called by the digester if a module was imported.<p> * * @param moduleHandler contains the imported module */ public void setModule(CmsModuleXmlHandler moduleHandler) { m_importedModule = moduleHandler.getModule(); }
/** * Creates a new module version based on a String.<p> * * @param version the version to set */ public CmsModuleVersion(String version) { setVersion(version); }
/** * Sets the list of module dependencies.<p> * * @param dependencies list of module dependencies */ public void setDependencies(List<CmsModuleDependency> dependencies) { checkFrozen(); m_dependencies = dependencies; }
/** * Sets the importScript.<p> * * @param importScript the importScript to set */ public void setImportScript(String importScript) { checkFrozen(); m_importScript = importScript; }
/** * Sets the installation date of this module.<p> * * * <i>Please note:</i>It's not possible to set the installation date once the module * configuration has been frozen.<p> * * @param value the installation date this module */ public void setDateInstalled(long value) { checkFrozen(); m_dateInstalled = value; }
/** * Sets the group name of this module.<p> * * * <i>Please note:</i>It's not possible to set the modules group name once the module * configuration has been frozen.<p> * * @param value the module group name to set */ public void setGroup(String value) { checkFrozen(); m_group = value; }
/** * Sets the parameters of this module.<p> * * * <i>Please note:</i>It's not possible to set the module parameters once the module * configuration has been frozen.<p> * * @param value the module parameters to set */ public void setParameters(SortedMap value) { checkFrozen(); m_parameters = value; }
/** * Sets the resources of this module.<p> * * * <i>Please note:</i>It's not possible to set the module resources once the module * configuration has been frozen.<p> * * @param value the module resources to set */ public void setResources(List value) { checkFrozen(); m_resources = value; }