Package ro.sync.exml

Class ComponentsValidator


  • @API(type=EXTENDABLE,
         src=PUBLIC)
    public abstract class ComponentsValidator
    extends java.lang.Object
    Validator interface for menus, toolbars and their actions.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String SEP
      Separator for menus and actions.
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String canonicalize​(java.lang.String[] path)
      Get a path from all the tags.
      abstract boolean isDebuggerPerspectiveAllowed()
      Check if the debugger perspective is allowed in the current distribution.
      boolean isMasterFilesSupportAvailable()
      Return true if main files support is available or not.
      boolean isPerspectiveAllowed​(java.lang.String perspID)
      Check if the perspective with the given ID is allowed.
      abstract boolean validateAccelAction​(java.lang.String category, java.lang.String tag)
      Check if the given accel action is allowed.
      abstract boolean validateComponent​(java.lang.String key)
      Check if the given component is allowed.
      abstract boolean validateContentType​(java.lang.String contentType)
      Validate the given content type.
      boolean validateEditorPage​(java.lang.String pageID)
      Check if the page is available for a certain distribution
      abstract boolean validateLibrary​(java.lang.String library)
      Validate the given library.
      abstract boolean validateMenuOrTaggedAction​(java.lang.String[] menuOrActionPath)
      Check if an menu or a tag action from a menu is allowed.
      abstract boolean validateNewEditorTemplate​(EditorTemplate editorTemplate)
      Validate the given template for a new editor in the current distribution.
      abstract boolean validateOption​(java.lang.String optionKey)
      Validate the given option.
      abstract boolean validateOptionPane​(java.lang.String optionPaneKey)
      Validate the given option pane.
      boolean validateScenario​(java.lang.String scenarioType)
      Validate scenario type for the current distribution.
      abstract boolean validateSHMarker​(java.lang.String marker)
      Check if this marker is allowed in the current distribution.
      boolean validateToolbarComposite​(java.lang.String toolbarCompositeTag)
      Checks if the toolbar composite is available.
      abstract boolean validateToolbarTaggedAction​(java.lang.String[] toolbarOrAction)
      Check if an action from a toolbar is allowed.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • SEP

        public static final java.lang.String SEP
        Separator for menus and actions.
        See Also:
        Constant Field Values
    • Constructor Detail

      • ComponentsValidator

        public ComponentsValidator()
    • Method Detail

      • validateMenuOrTaggedAction

        public abstract boolean validateMenuOrTaggedAction​(java.lang.String[] menuOrActionPath)
        Check if an menu or a tag action from a menu is allowed.
        Parameters:
        menuOrActionPath - The tag of the menu/action and the tags of its parent menus if any. The last component is the current one. A menu path is an array of Strings representing the Tags, ending with the current menu tag, or null.
        Returns:
        true if the action is allowed.
      • validateToolbarTaggedAction

        public abstract boolean validateToolbarTaggedAction​(java.lang.String[] toolbarOrAction)
        Check if an action from a toolbar is allowed.
        Parameters:
        toolbarOrAction - The tag of the action from a toolbar and the tag of its parent toolbar if any.
        Returns:
        true if the action is allowed.
      • validateToolbarComposite

        public boolean validateToolbarComposite​(java.lang.String toolbarCompositeTag)
        Checks if the toolbar composite is available. A toolbar composite is a toolbar component such as a drop-down list.
        Parameters:
        toolbarCompositeTag - The tag of the toolbar composite.
        Returns:
        true if the toolbar composite is allowed.
        Since:
        17
      • validateComponent

        public abstract boolean validateComponent​(java.lang.String key)
        Check if the given component is allowed.
        Parameters:
        key - Tag identifying the view. Usually one of the constants from MainFrameComponentProvider
        Returns:
        true if the view is allowed.
      • validateAccelAction

        public abstract boolean validateAccelAction​(java.lang.String category,
                                                    java.lang.String tag)
        Check if the given accel action is allowed. An accel action can be uniquely identified so it doesn't matter if it is from a toolbar or menu.
        Parameters:
        category - The category of the action.
        tag - The tag of the action.
        Returns:
        true if the action is allowed.
      • validateContentType

        public abstract boolean validateContentType​(java.lang.String contentType)
        Validate the given content type.
        Parameters:
        contentType - The content type. A constant from ContentTypes interface.
        Returns:
        true if in the current distribution we support the given content type.
      • validateOptionPane

        public abstract boolean validateOptionPane​(java.lang.String optionPaneKey)
        Validate the given option pane.
        Parameters:
        optionPaneKey - The option pane key. A constant defined in OptionTags.
        Returns:
        true if in the current distribution we should add the given option pane in the option tree.
      • validateOption

        public abstract boolean validateOption​(java.lang.String optionKey)
        Validate the given option.
        Parameters:
        optionKey - The option key. A constant defined in OptionTags.
        Returns:
        true if in the current distribution we should add the given option in the option page.
      • validateLibrary

        public abstract boolean validateLibrary​(java.lang.String library)
        Validate the given library.
        Parameters:
        library - The library.
        Returns:
        true if in the current distribution we should add the given library in the about dialog.
      • validateNewEditorTemplate

        public abstract boolean validateNewEditorTemplate​(EditorTemplate editorTemplate)
        Validate the given template for a new editor in the current distribution.
        Parameters:
        editorTemplate - The editor template.
        Returns:
        true if it is allowed.
      • isDebuggerPerspectiveAllowed

        public abstract boolean isDebuggerPerspectiveAllowed()
        Check if the debugger perspective is allowed in the current distribution. Also see isPerspectiveAllowed(String).
        Returns:
        true if the debugger functionality is allowed.
      • isPerspectiveAllowed

        public boolean isPerspectiveAllowed​(java.lang.String perspID)
        Check if the perspective with the given ID is allowed. Also see isDebuggerPerspectiveAllowed().
        Parameters:
        perspID - Perspective ID. See the constants from UIPerspectives.
        Returns:
        true if the perspective is allowed.
        Since:
        22
      • validateSHMarker

        public abstract boolean validateSHMarker​(java.lang.String marker)
        Check if this marker is allowed in the current distribution.
        Parameters:
        marker - The marker to be checked. A constant from SHMarker class.
        Returns:
        true if the marker is allowed.
      • validateEditorPage

        public boolean validateEditorPage​(java.lang.String pageID)
        Check if the page is available for a certain distribution
        Parameters:
        pageID - The page ID
        Returns:
        true if the editor page is available.
        Since:
        16
      • canonicalize

        public java.lang.String canonicalize​(java.lang.String[] path)
        Get a path from all the tags.
        Parameters:
        path - The tags for the action/menu/toolbar and its menu/toolbar ancestors.
        Returns:
        A path that can be used to identify it.
      • isMasterFilesSupportAvailable

        public boolean isMasterFilesSupportAvailable()
        Return true if main files support is available or not.
        Returns:
        Return true if main files support is available or not.
      • validateScenario

        public boolean validateScenario​(java.lang.String scenarioType)
        Validate scenario type for the current distribution.
        Parameters:
        scenarioType - The scenario type.
        Returns:
        true if the scenario is allowed, false otherwise.
        Since:
        26.1

        *********************************
        EXPERIMENTAL - Subject to change
        ********************************

        Please note that this API is not marked as final and it can change in one of the next versions of the application. If you have suggestions, comments about it, please let us know.