Package com.jalios.jcms.jportal
Class JPortalManager
java.lang.Object
com.jalios.jcms.jportal.JPortalManager
- All Implemented Interfaces:
JPropertiesListener
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic class -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionbooleanactivateTypeInWorkspace(Workspace workspace, String applicationClass, Member author) Active the given application class type in the given workspacebooleanduplicateJPortal(AbstractJPortal jportal, WizardContext context, boolean updateIds) Duplicate aJPortalduplicateJPortalMapping(JPortalMapping jPortalMapping, boolean updateids, WizardContext context) Duplicate a JPortalMapping, iterate throughJBlockMappingand duplicate themgetAllPortlets(AbstractJPortal jPortal, JPortalMapping mapping) static JPortalManagergetJPortalComponentSet(String userLang, String search) getJPortalMapping(AbstractJPortal jPortal, boolean isDraftStructure) GetJPortalMappingand save if as extra infogetJPortalMapping(JPortalStructure structure) getJPortalStructure(AbstractJPortal jPortal, boolean isDraftStructure) getJPortalStructure(String structureId) RetrieveJPortalStructuregetJPortalStructures(AbstractJPortal jportal, int firstResult, int maxResults) Retrieve a list ofJPortalStructurefor the givenAbstractJPortalgetJPortalTemplate(String templateName) getPortletPortalSet(Portlet portlet, Member mbr, AbstractJPortal currentJPortal) Returns the set of PortalInterface where the given Portlet is usedgetPortletSet(AbstractJPortal jportal, Class selectedPortletType, String search, String userLang) booleanisCompatibleType(Portlet portlet) booleanisCompatibleType(Class portletClass) Return true if given class is a JPortal compatible type, by searching in blacklistbooleanbooleanmoveBlockOrAddPortletAndUpdateSizes(AbstractJPortal jportal, String blocksAndSize, String blockToMoveId, String targetBlockId, JPortalConstants.BlockDropPositions dropPosition, String newBlockId, Member author, String portletId) voidpropertiesChange(JProperties properties) Invoked after properties have been modified in JCMS and save on disk.publishJPortal(AbstractJPortal jportal, Member author) Publish a jportal with the latest structurepublishJPortal(AbstractJPortal jPortal, String jPortalName, Member mbr, Map<String, Object> context, int pstatus, Category[] categories, Date pdate, String title, HashMap<String, String> titleML) Publish the JPortalremoveBlockFromStructure(AbstractJPortal jportal, String blockId, Member author) Remove the given blockId from the current JPortal structure Save the tructure and publish the JPortalvoidresetJPortalHistory(AbstractJPortal jPortal) Reset the history of a given JPortal (remove all entries in database)revertJPortalStructure(AbstractJPortal jPortal, JPortalStructure structure, Member mbr) saveJPortalStructure(AbstractJPortal jPortal, JPortalMapping jPortalMapping, Member mbr) Saves the givenJPortalMappingfor givenAbstractJPortalsaveJPortalStructure(AbstractJPortal jPortal, JPortalMapping jPortalMapping, Member mbr, boolean published) saveJPortalStructure(AbstractJPortal jPortal, String jPortalMappingJSon, Member mbr) Saves the givenJPortalMappingfor givenAbstractJPortalupdateJPortalBlocksAndSize(AbstractJPortal jportal, String blocksAndSize, Member author) Iterate through all blocks of the jportal Remove block not present in the blocksAndSize map Update all blocks size
-
Field Details
-
JPORTAL_MAPPING_EXTRA_INFO_KEY
- See Also:
-
OK_ACTION
-
-
Method Details
-
getInstance
-
propertiesChange
Description copied from interface:JPropertiesListenerInvoked after properties have been modified in JCMS and save on disk.You cannot alter the value received in parameters.
Note that properties parameter may be null, a limited set of site properties, or all site properties.
To check that a property has been modified, reload the "current" property instead using
channel.getPropertiesorchannel.getProperty.- Specified by:
propertiesChangein interfaceJPropertiesListener- Parameters:
properties- the properties which have been submitted to change
-
isHideEditFieldsEnabled
public boolean isHideEditFieldsEnabled() -
isStrictPortletModeCreationEnabled
public boolean isStrictPortletModeCreationEnabled()- Returns:
- true if strict portletModeCreation is enabled : user can only add a portlet / application in jportal / CSP applications without having to enable the portlet type in workspace if this mode is disabled
- Since:
- jcms-10.0.7
-
canUpdateJPortalJavascriptAndCss
-
getPortletTypeMap
-
getJPortalComponentSet
-
revertJPortalStructure
public JPortalMapping revertJPortalStructure(AbstractJPortal jPortal, JPortalStructure structure, Member mbr) -
getJPortalMapping
GetJPortalMappingand save if as extra info- Parameters:
jPortal-isDraftStructure-- Returns:
JPortalMappingmapping
-
getJPortalMapping
-
saveJPortalStructure
public ControllerStatus saveJPortalStructure(AbstractJPortal jPortal, JPortalMapping jPortalMapping, Member mbr) Saves the givenJPortalMappingfor givenAbstractJPortal- Parameters:
jPortal- theAbstractJPortaljPortalMapping- theJPortalMappingmbr- theMember- Returns:
ControllerStatus
-
saveJPortalStructure
public ControllerStatus saveJPortalStructure(AbstractJPortal jPortal, JPortalMapping jPortalMapping, Member mbr, boolean published) -
saveJPortalStructure
public JPortalActionResult saveJPortalStructure(AbstractJPortal jPortal, String jPortalMappingJSon, Member mbr) Saves the givenJPortalMappingfor givenAbstractJPortal- Parameters:
jPortal- theAbstractJPortaljPortalMappingJSon- JSon structure of Portalmbr- theMember- Returns:
JPortalActionResult
-
getJPortalStructures
public List<JPortalStructure> getJPortalStructures(AbstractJPortal jportal, int firstResult, int maxResults) Retrieve a list ofJPortalStructurefor the givenAbstractJPortal- Parameters:
jportal-firstResult-maxResults-- Returns:
- List of
JPortalStructurewith the given parameters
-
getLastPublishedJPortalStructureFromDatabase
- Parameters:
jPortal-- Returns:
-
getJPortalStructure
- Parameters:
jPortal- theAbstractJPortalisDraftStructure- if true, will search for not published structure- Returns:
- the
JPortalStructurefor givenAbstractJPortal
-
getJPortalStructure
RetrieveJPortalStructure- Parameters:
structureId-- Returns:
JPortalStructurewith the given ID
-
publishJPortal
public ControllerStatus publishJPortal(AbstractJPortal jPortal, String jPortalName, Member mbr, Map<String, Object> context, int pstatus, Category[] categories, Date pdate, String title, HashMap<String, String> titleML) Publish the JPortal- Parameters:
jPortal- theAbstractJPortaljPortalName- the JPortal namembr- theMemberperforming the actioncontext- for update contextpstatus- the workflow statuscategories- theCategoryarray of this JPortalpdate- the date of publication- Returns:
- a
ControllerStatusbased on result of the performed action
-
resetJPortalHistory
Reset the history of a given JPortal (remove all entries in database)- Parameters:
jPortal-
-
getAllPortlets
-
isCompatibleType
-
isCompatibleType
Return true if given class is a JPortal compatible type, by searching in blacklist- Parameters:
portletClass- the Portlet class- Returns:
- true if given class is a JPortal compatible type
- Since:
- jcms-10.0.7
-
getPortletSet
public Set<PortalElement> getPortletSet(AbstractJPortal jportal, Class selectedPortletType, String search, String userLang) -
duplicateJPortal
public ControllerStatus duplicateJPortal(AbstractJPortal jportal, WizardContext context, boolean updateIds) Duplicate aJPortal- Parameters:
jportal- theJPortalto duplicatecontext- Wizardcontext from the duplicate() method onAbstractJPortalupdateIds- if true, will only update the portlet ids from the jportalMapping and update store structure, if false, will duplicate the portlet- Returns:
ControllerStatus
-
duplicateJPortalMapping
public JPortalMapping duplicateJPortalMapping(JPortalMapping jPortalMapping, boolean updateids, WizardContext context) Duplicate a JPortalMapping, iterate throughJBlockMappingand duplicate them- Parameters:
jPortalMapping-JPortalMappingto be duplicatedupdateids- if true, will only update the portlet ids from the jportalMapping, if false, will duplicate the portletcontext-WizardContext- Returns:
- a new
JPortalMapping
-
getJPortalTemplateList
-
getJPortalTemplate
-
getPortletPortalSet
public Set<PortalInterface> getPortletPortalSet(Portlet portlet, Member mbr, AbstractJPortal currentJPortal) Returns the set of PortalInterface where the given Portlet is used- Parameters:
portlet- thePortletmbr- theMemberto check read rights- Returns:
- a Set of
PortalInterface
-
moveBlockOrAddPortletAndUpdateSizes
public JPortalActionResult moveBlockOrAddPortletAndUpdateSizes(AbstractJPortal jportal, String blocksAndSize, String blockToMoveId, String targetBlockId, JPortalConstants.BlockDropPositions dropPosition, String newBlockId, Member author, String portletId) -
updateJPortalBlocksAndSize
public JPortalActionResult updateJPortalBlocksAndSize(AbstractJPortal jportal, String blocksAndSize, Member author) Iterate through all blocks of the jportal Remove block not present in the blocksAndSize map Update all blocks size- Parameters:
jportal-blocksAndSize-author-- Returns:
JPortalActionResult
-
removeBlockFromStructure
public JPortalActionResult removeBlockFromStructure(AbstractJPortal jportal, String blockId, Member author) Remove the given blockId from the current JPortal structure Save the tructure and publish the JPortal- Parameters:
jportal-blockId-author-- Returns:
- a
JPortalActionResult
-
publishJPortal
Publish a jportal with the latest structure- Parameters:
jportal-author-- Returns:
JPortalActionResult
-
activateTypeInWorkspace
Active the given application class type in the given workspace- Parameters:
workspace-AccessControlList.WorkspaceAclSelectorapplicationClass- classNameauthor-Member- Returns:
- true if the type is activate
-