Package org.fenixedu.cms.domain
Class CMSTheme
- java.lang.Object
-
- pt.ist.fenixframework.core.AbstractDomainObject
-
- org.fenixedu.cms.domain.CMSTheme_Base
-
- org.fenixedu.cms.domain.CMSTheme
-
- All Implemented Interfaces:
Serializable,pt.ist.fenixframework.DomainObject
public class CMSTheme extends CMSTheme_Base
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static StringSIGNAL_CREATEDstatic StringSIGNAL_DELETEDstatic StringSIGNAL_EDITED
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidchangeFiles(CMSThemeFiles files)byte[]contentForPath(String t)booleandefinesPath(String string)voiddelete()CMSThemeFilefileForPath(String path)Searches for aCMSThemeFilewith a given name on this theme.static CMSThemeforType(String t)Searches for aCMSThemewith a given type.Stream<Site>getAllSitesStream()Set<CMSTemplate>getAllTemplates()StringgetAssetsPath()static CMSThemegetDefaultTheme()Set<CMSTemplate>getExtendedTemplates()Set<Site>getSitesSet()booleanisDefault()static voidloadDefaultTheme()CMSTemplatetemplateForType(String type)Searches for aCMSTemplatewith a given type on this theme.-
Methods inherited from class org.fenixedu.cms.domain.CMSTheme_Base
addBuilders, addChildren, addSites, addTemplates, getBennu, getBuildersSet, getChildrenSet, getCreatedBy, getCreationDate, getDefaultTemplate, getDescription, getExtended, getFiles, getName, getPreviewImage, getPreviewImagePath, getPrimaryBennu, getRelationCMSTemplateCMSTheme, getRelationCMSThemeBennu, getRelationCMSThemeCMSTheme, getRelationCMSThemeUser, getRelationDefaultPage, getRelationPrimaryCMSThemeBennu, getRelationSiteBuilderCMSTheme, getRelationSiteCMSTheme, getRelationThemePreview, getTemplatesSet, getType, removeBuilders, removeChildren, removeSites, removeTemplates, setBennu, setCreatedBy, setCreationDate, setDefaultTemplate, setDescription, setExtended, setFiles, setName, setPreviewImage, setPreviewImagePath, setPrimaryBennu, setType
-
-
-
-
Field Detail
-
SIGNAL_CREATED
public static final String SIGNAL_CREATED
- See Also:
- Constant Field Values
-
SIGNAL_DELETED
public static final String SIGNAL_DELETED
- See Also:
- Constant Field Values
-
SIGNAL_EDITED
public static final String SIGNAL_EDITED
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
CMSTheme
public CMSTheme()
The loggedUsercreates a new instance of aCMSTheme
-
-
Method Detail
-
loadDefaultTheme
public static void loadDefaultTheme()
-
getDefaultTheme
public static CMSTheme getDefaultTheme()
-
templateForType
public CMSTemplate templateForType(String type)
Searches for aCMSTemplatewith a given type on this theme.- Parameters:
type- type the type of the wantedCMSTemplate.- Returns:
- the
CMSTemplatewith the given type if it exists, or null otherwise.
-
fileForPath
public CMSThemeFile fileForPath(String path)
Searches for aCMSThemeFilewith a given name on this theme.- Parameters:
path- the displayName of the wantedCMSThemeFile.- Returns:
- the
CMSThemeFilewith the given displayName if it exists, or null otherwise.
-
contentForPath
public byte[] contentForPath(String t)
-
definesPath
public boolean definesPath(String string)
-
isDefault
public boolean isDefault()
- Returns:
- true if this is the default theme for the CMS, and false otherwise.
-
delete
public void delete()
-
getAssetsPath
public String getAssetsPath()
-
changeFiles
public void changeFiles(CMSThemeFiles files)
-
getAllTemplates
public Set<CMSTemplate> getAllTemplates()
-
getExtendedTemplates
public Set<CMSTemplate> getExtendedTemplates()
-
getSitesSet
public Set<Site> getSitesSet()
- Overrides:
getSitesSetin classCMSTheme_Base
-
-