Class WSTypeEntry

    • Field Detail

      • typeEntry

        protected transient TypeEntry typeEntry
      • type

        protected transient java.lang.Class<? extends Publication> type
      • workspace

        protected transient Workspace workspace
      • workspaceForced

        protected transient boolean workspaceForced
      • templateSet

        protected transient java.util.Set<java.lang.String> templateSet
      • className

        protected java.lang.String className
      • debatable

        protected java.lang.Boolean debatable
      • categoryTab

        protected java.lang.Boolean categoryTab
      • templateTab

        protected java.lang.Boolean templateTab
      • readRightTab

        protected java.lang.Boolean readRightTab
      • updateRightTab

        protected java.lang.Boolean updateRightTab
      • workflowTab

        protected java.lang.Boolean workflowTab
      • advancedTab

        protected java.lang.Boolean advancedTab
      • categories

        protected java.lang.String[] categories
      • groups

        protected java.lang.String[] groups
      • labelMap

        protected java.util.HashMap<java.lang.String,​java.lang.String> labelMap
      • descriptionMap

        protected java.util.HashMap<java.lang.String,​java.lang.String> descriptionMap
      • useDefaultCategories

        protected boolean useDefaultCategories
      • useDefaultGroups

        protected boolean useDefaultGroups
      • workflowId

        protected java.lang.String workflowId
      • instanceWorkflowEnabled

        protected boolean instanceWorkflowEnabled
      • templates

        protected java.lang.String[] templates
    • Constructor Detail

      • WSTypeEntry

        public WSTypeEntry()
      • WSTypeEntry

        public WSTypeEntry​(java.lang.Class<? extends Publication> clazz,
                           Workspace workspace)
      • WSTypeEntry

        public WSTypeEntry​(java.lang.String className,
                           Workspace workspace)
      • WSTypeEntry

        public WSTypeEntry​(WSTypeEntry clone)
    • Method Detail

      • isSameProperties

        public boolean isSameProperties()
        Checks if this WSTypeEntry have same properties that it's original TypeEntry. This convenient method should be used to check if the Data must be stored/used or deleted. It doesn't check for workflow properties because workflow may leave without WSTypeEntry (backward compatibility)
        Returns:
        boolean true if there is te same properties.
        See Also:
        Workspace.setWSTypeEntry(Class, WSTypeEntry)
      • toFullString

        public java.lang.String toFullString()
        Overrides:
        toFullString in class Data
      • isForced

        public boolean isForced()
        Returns true if this object has been forced for a given workspace but not really exists in the store. It is only a convenient wrapper.
        Returns:
        true if this instance has been forced
      • checkMember

        public ControllerStatus checkMember​(int op,
                                            Member mbr,
                                            java.util.Map context)
        Description copied from class: Data
        Checks if the given member can perform the given operation. This method is called by checkWrite. It should be overrided by sub-classes.
        Overrides:
        checkMember in class Data
        Parameters:
        op - the operation (OP_CREATE, OP_UPDATE, ...)
        mbr - the member which requests the write operation
        context - a map which contains context parameters (may be null)
        Returns:
        a ControllerStatus
        See Also:
        Data.checkMember(int, Member, Map)
      • checkCreate

        public ControllerStatus checkCreate​(Member mbr,
                                            java.util.Map context)
        Description copied from class: Data
        Checks if the creation can be performed
        Overrides:
        checkCreate in class Data
        Parameters:
        mbr - the member which requests the write operation
        context - a map which contains context parameters (may be null)
        Returns:
        a ControllerStatus
        See Also:
        Data.checkCreate(Member, Map)
      • checkUpdate

        public ControllerStatus checkUpdate​(Member mbr,
                                            java.util.Map context)
        Description copied from class: Data
        Checks if the update can be performed
        Overrides:
        checkUpdate in class Data
        Parameters:
        mbr - the member which requests the write operation
        context - a map which contains context parameters (may be null)
        Returns:
        a ControllerStatus
        See Also:
        Data.checkUpdate(Member, Map)
      • performCreate

        public void performCreate​(Member mbr,
                                  java.util.Map context)
        Description copied from class: Data
        Performs data creation.
        Overrides:
        performCreate in class Data
        Parameters:
        mbr - the member which requests the write operation
        context - a map which contains context parameters (may be null)
        See Also:
        Data.performCreate(Member, Map)
      • performDelete

        public void performDelete​(Member mbr,
                                  java.util.Map context)
        Description copied from class: Data
        Performs data deletion.
        Overrides:
        performDelete in class Data
        Parameters:
        mbr - the member which requests the write operation
        context - a map which contains context parameters (may be null)
        See Also:
        Data.performDelete(Member, Map)
      • getTemplateEntry

        public TypeTemplateEntry getTemplateEntry​(java.lang.String name)
        Returns a TypeTemplateEntry matching the given template name
        Parameters:
        name - the template name
        Returns:
        TypeTemplateEntry that describe template
        Since:
        jcms-6.0.0
        See Also:
        TypeEntry.getTemplateEntry(String)
      • getFirstTemplateEntry

        public TypeTemplateEntry getFirstTemplateEntry​(java.lang.String usage,
                                                       java.lang.String[] names)
        Returns the first TypeTemplateEntry from given names matching given usage
        Parameters:
        usage - the template usage
        names - an array of templates name
        Returns:
        TypeTemplateEntry matching
        Since:
        jcms-6.0.0
        See Also:
        TypeEntry.getFirstTemplateEntry(String, String[])
      • getDefaultTemplateEntry

        public TypeTemplateEntry getDefaultTemplateEntry​(java.lang.String usage)
        Returns a default TypeTemplateEntry matching the given usage for the current workspace
        Parameters:
        usage - the template usage
        Returns:
        TypeTemplateEntry
        Since:
        jcms-6.0.0
        See Also:
        TypeEntry.getDefaultTemplateEntry(String)
      • getTemplateEntrySet

        public java.util.Set<TypeTemplateEntry> getTemplateEntrySet​(java.lang.String usage)
        Returns a new Set of TypeTemplateEntry matching the given usage for the current workspace
        Parameters:
        usage - the template usage
        Returns:
        Set of TypeTemplateEntry
        Since:
        jcms-6.0.0
      • getDefaultTemplateEntrySet

        public java.util.Set<TypeTemplateEntry> getDefaultTemplateEntrySet()
        Returns all default template entries
        Returns:
        Set of TypeTemplateEntry
        Since:
        jcms-6.0.1
      • getDefaultTemplateNameSet

        public java.util.Set<java.lang.String> getDefaultTemplateNameSet()
        Returns all default template names
        Returns:
        Set of template names
        Since:
        jcms-6.0.1
      • getTemplateUsageMap

        public java.util.Map<java.lang.String,​java.util.Set<TypeTemplateEntry>> getTemplateUsageMap()
        Returns a Map of usage/Set of TypeTemplateEntry.
        Returns:
        Map of TypeTemplateEntry
      • hasTemplate

        public boolean hasTemplate​(java.lang.String name,
                                   boolean checkType)
        Returns true if the WSTypeEntry manage/allow the given template
        Parameters:
        name - the template name to check
        checkType - if true, check template type if there is no template for this WSTypeEntry
        Returns:
        true if WSTypeEntry
        Since:
        jcms-9.0.1
      • hasTemplate

        public boolean hasTemplate​(java.lang.String name)
        Returns true if the WSTypeEntry manage/allow the given template
        Parameters:
        name - the template name to check
        Returns:
        true if WSTypeEntry
        Since:
        jcms-6.0.0
      • getChannelTypeEntry

        public TypeEntry getChannelTypeEntry()
        Returns the Main TypeEntry defined for a given type.
        Returns:
        TypeEntry the channel TypeEntry
      • getWorkflow

        public Workflow getWorkflow​(boolean checkSuperclass)
        Return the workflow for this given type in given workspace. If there is no workflow then return WorkflowManager.DEFAULT_WORKFLOW If there is no Workspace then return null.
        Parameters:
        checkSuperclass - check super class
        Returns:
        String the name of the Workflow
      • getType

        public java.lang.Class<? extends Publication> getType()
        Returns the type this WSTypeEntry controls.
        Returns:
        the type this WSTypeEntry controls.
        Since:
        jcms-5.5.0
      • getWorkspace

        public Workspace getWorkspace()
        Returns the workspace this WSTypeEntry belongs to.
        Returns:
        the workspace this WSTypeEntry belongs to.
        Since:
        jcms-5.5.0
      • setWorkspace

        public void setWorkspace​(Workspace workspace)
        Sets the workspace without setting workspaceForced This method should only be called by WorkspaceWizardHandler for clone purpose.
        Parameters:
        workspace - the workspace
      • isAdvancedTab

        public boolean isAdvancedTab()
        Returns the available state of advanced tab
        Returns:
        boolean true to display advanced Tab
        See Also:
        TypeEntry.isAdvancedTab()
      • isCategoryTab

        public boolean isCategoryTab()
        Returns the available state of category tab
        Returns:
        boolean true to display category Tab
        See Also:
        TypeEntry.isCategoryTab()
      • isDebatable

        public boolean isDebatable()
        Check if type is debatable for the given workspace.
        Returns:
        boolean true it type is reviewable
        See Also:
        TypeEntry.isDebatable()
      • isReadRightTab

        public boolean isReadRightTab()
        Returns the available state of readRight tab
        Returns:
        boolean true to display readRight Tab
        See Also:
        TypeEntry.isReadRightTab()
      • isTemplateTab

        public boolean isTemplateTab()
        Returns the available state of template tab
        Returns:
        boolean true to display template Tab
        See Also:
        TypeEntry.isTemplateTab()
      • isUpdateRightTab

        public boolean isUpdateRightTab()
        Returns the available state of updateRight tab
        Returns:
        boolean true to display updateRight Tab
        See Also:
        TypeEntry.isUpdateRightTab()
      • isWorkflowTab

        public boolean isWorkflowTab()
        Returns the available state of workflow tab
        Returns:
        boolean true to display Workflow Tab
        See Also:
        TypeEntry.isWorkflowTab()
      • getAvailableCategories

        public java.lang.String[] getAvailableCategories()
        Returns the available categories
        Returns:
        String[] an array of categories
        See Also:
        TypeEntry.getCategories()
      • getAvailableGroups

        public java.lang.String[] getAvailableGroups()
        Returns the available groups
        Returns:
        String[] an array of groups
        See Also:
        TypeEntry.getGroups()
      • getAvailableLabel

        public java.lang.String getAvailableLabel​(java.lang.String lang)
        Returns the label of this type in the given language or else in the channel's language otherwise it returns an available value in an arbitrary language.
        Parameters:
        lang - the language
        Returns:
        the label of this type in the given language.
        See Also:
        TypeEntry.getLabel(String)
      • getAvailableDescription

        public java.lang.String getAvailableDescription​(java.lang.String lang)
        Returns the description of this type in the given language.
        Parameters:
        lang - the language
        Returns:
        the description of this type in the given language.
        See Also:
        TypeEntry.getDescription(String)
      • getWorkflowId

        public java.lang.String getWorkflowId()
        Return the name of the workflow for this given type in given workspace. Should only be called by WSTypeEntry_HANDLER
        Returns:
        String the name of the Workflow
      • getClassName

        public java.lang.String getClassName()
        Returns the name of the class of the given Type for this TypeEntry.
        Returns:
        String the ClassName
      • getTemplates

        public java.lang.String[] getTemplates()
        Returns a Set of display template's name used for this type by this workspace.
        Returns:
        String[] of template name
      • getAdvancedTab

        public java.lang.Boolean getAdvancedTab()
        Returns specific advancedTab state for this WSTypeEntry It doesn't return any information from TypeEntry. Developpers should call isAdvancedTab() This method should only be called by WSTypeEntry_HANDLER
        Returns:
        Boolean true to display advancedTab
        See Also:
        isAdvancedTab()
      • getCategories

        public java.lang.String[] getCategories()
        Returns specific categories sets for this WSTypeEntry It doesn't return any information from TypeEntry. Developpers should call getAvailableCategories() This method should only be called by WSTypeEntry_HANDLER
        Returns:
        String[] an array of category ids
        See Also:
        getAvailableCategories()
      • getGroups

        public java.lang.String[] getGroups()
        Returns specific groups sets for this WSTypeEntry It doesn't return any information from TypeEntry. Developpers should call getAvailableGroups() This method should only be called by WSTypeEntry_HANDLER
        Returns:
        String[] an array of category ids
        See Also:
        getAvailableGroups()
      • getCategoryTab

        public java.lang.Boolean getCategoryTab()
        Returns specific CategoryTab state for this WSTypeEntry It doesn't return any information from TypeEntry. Developpers should call isCategoryTab() This method should only be called by WSTypeEntry_HANDLER
        Returns:
        Boolean true to display category tab
        See Also:
        isCategoryTab()
      • getDebatable

        public java.lang.Boolean getDebatable()
        Returns specific debatable state for this WSTypeEntry It doesn't return any information from TypeEntry. Developpers should call isDebatable() This method should only be called by WSTypeEntry_HANDLER
        Returns:
        Boolean true if debatable
        See Also:
        isDebatable()
      • getLabelMap

        public java.util.Map<java.lang.String,​java.lang.String> getLabelMap()
        Returns the label map ({lang, value}).
        Returns:
        the label map ({lang, value}).
        Since:
        jcms-5.7.0
      • getDescriptionMap

        public java.util.Map<java.lang.String,​java.lang.String> getDescriptionMap()
        Returns the description map ({lang, value}).
        Returns:
        the description map ({lang, value}).
        Since:
        jcms-5.7.0
      • getReadRightTab

        public java.lang.Boolean getReadRightTab()
        Returns specific ReadRightTab state for this WSTypeEntry It doesn't return any information from TypeEntry. Developpers should call isReadRightTab() This method should only be called by WSTypeEntry_HANDLER
        Returns:
        Boolean true to display ReadRightTab
        See Also:
        isReadRightTab()
      • getTemplateTab

        public java.lang.Boolean getTemplateTab()
        Returns specific TemplateTab state for this WSTypeEntry It doesn't return any information from TypeEntry. Developpers should call isTemplateTab() This method should only be called by WSTypeEntry_HANDLER
        Returns:
        Boolean true to display TemplateTab
        See Also:
        isTemplateTab()
      • getUpdateRightTab

        public java.lang.Boolean getUpdateRightTab()
        Returns specific UpdateRightTab state for this WSTypeEntry It doesn't return any information from TypeEntry. Developpers should call isUpdateRightTab() This method should only be called by WSTypeEntry_HANDLER
        Returns:
        Boolean true to display UpdateRightTab
        See Also:
        isUpdateRightTab()
      • getWorkflowTab

        public java.lang.Boolean getWorkflowTab()
        Returns specific WorkflowTab state for this WSTypeEntry It doesn't return any information from TypeEntry. Developpers should call isWorkflowTab() This method should only be called by WSTypeEntry_HANDLER
        Returns:
        Boolean true to display WorkflowTab
        See Also:
        isWorkflowTab()
      • getUseDefaultCategories

        public boolean getUseDefaultCategories()
        Convenient getter to check if specific categories has been set Should only be called by WSTypeEntry_HANDLER
        Returns:
        Boolean
      • getUseDefaultGroups

        public boolean getUseDefaultGroups()
        Convenient getter to check if specific groups has been set Should only be called by WSTypeEntry_HANDLER
        Returns:
        Boolean
      • getTabLabel

        public java.lang.String getTabLabel​(java.lang.String tabId,
                                            java.lang.String lang)
        Returns the localized label for the given tab identifier.
        Parameters:
        tabId - the tab identifier
        lang - the language
        Returns:
        the localized label for the given tab identifier.
        Since:
        jcms-5.7.0
      • getInstanceWorkflowEnabled

        public boolean getInstanceWorkflowEnabled()
        Returns specific instanceWorkflowEnabled state for this WSTypeEntry It doesn't return any information from TypeEntry. Developpers should call isInstanceWorkflowEnabled() This method should only be called by WSTypeEntry_HANDLER
        Returns:
        boolean true if instance workflow are enabled
      • setWorkflowId

        public void setWorkflowId​(java.lang.String workflowId)
        Sets the name of the workflow for this given type in given workspace.
        Parameters:
        workflowId - the name of the Workflow
      • setClassName

        public void setClassName​(java.lang.String className)
        Set the classname for the WSTypeEntry This method should ONLY be called by Store to set the TypeEntry.
        Parameters:
        className - the class name
      • setTemplates

        public void setTemplates​(java.lang.String[] templates)
        Sets all the template's name available in the current workspace for the current type.
        Parameters:
        templates - array of template name
      • setCategories

        public void setCategories​(java.lang.String[] categories)
        Sets specific categories for this WSTypeEntry
        Parameters:
        categories - the categories
        See Also:
        TypeEntry.setCategories(String[])
      • setGroups

        public void setGroups​(java.lang.String[] groups)
        Sets specific groups for this WSTypeEntry
        Parameters:
        groups - the groups
        See Also:
        TypeEntry.setGroups(String[])
      • setLabelMap

        public void setLabelMap​(java.util.HashMap<java.lang.String,​java.lang.String> labelMap)
        Sets labelMap.
        Parameters:
        labelMap - the label map
        Since:
        jcms-5.7.0
      • setDescriptionMap

        public void setDescriptionMap​(java.util.HashMap<java.lang.String,​java.lang.String> descriptionMap)
        Sets descriptionMap.
        Parameters:
        descriptionMap - the description map
        Since:
        jcms-5.7.0
      • setAdvancedTab

        public void setAdvancedTab​(java.lang.Boolean isAdvancedTab)
        Sets specific advancedTab state for this WSTypeEntry
        Parameters:
        isAdvancedTab - true if advanced tab must be displayed
        See Also:
        TypeEntry.setAdvancedTab(boolean)
      • setWorkflowTab

        public void setWorkflowTab​(java.lang.Boolean isWorkflowTab)
        Sets specific workflowTab state for this WSTypeEntry
        Parameters:
        isWorkflowTab - true if workflow tab must be displayed
        See Also:
        TypeEntry.setWorkflowTab(boolean)
      • setUpdateRightTab

        public void setUpdateRightTab​(java.lang.Boolean isUpdateRightTab)
        Sets specific updateRightTab state for this WSTypeEntry
        Parameters:
        isUpdateRightTab - true if update rights tab must be displayed
        See Also:
        TypeEntry.setUpdateRightTab(boolean)
      • setTemplateTab

        public void setTemplateTab​(java.lang.Boolean isTemplateTab)
        Sets specific templateTab state for this WSTypeEntry
        Parameters:
        isTemplateTab - true if template tab must be displayed
        See Also:
        TypeEntry.setTemplateTab(boolean)
      • setReadRightTab

        public void setReadRightTab​(java.lang.Boolean isReadRightTab)
        Sets specific readRightTab state for this WSTypeEntry
        Parameters:
        isReadRightTab - true if read rights tab must be displayed
        See Also:
        TypeEntry.setReadRightTab(boolean)
      • setDebatable

        public void setDebatable​(java.lang.Boolean isDebatable)
        Sets specific debatable state for this WSTypeEntry
        Parameters:
        isDebatable - true if instances will debatable
        See Also:
        TypeEntry.setDebatable(boolean)
      • setCategoryTab

        public void setCategoryTab​(java.lang.Boolean isCategoryTab)
        Sets specific categories sets for this WSTypeEntry
        Parameters:
        isCategoryTab - true if category tab must be displayed
        See Also:
        TypeEntry.setCategoryTab(boolean)
      • setUseDefaultGroups

        public void setUseDefaultGroups​(boolean useDefaultGroups)
      • setUseDefaultCategories

        public void setUseDefaultCategories​(boolean useDefaultCategories)
      • setInstanceWorkflowEnabled

        public void setInstanceWorkflowEnabled​(boolean instanceWorkflowEnabled)
        Sets for this WSTypeEntry if instance workflow are enabled
        Parameters:
        instanceWorkflowEnabled - true to enable instance workflow