Class KeyDefinitionManager


  • @API(type=EXTENDABLE,
         src=PUBLIC)
    public abstract class KeyDefinitionManager
    extends java.lang.Object
    Provides information about all key definitions which are a context for all opened topics. This is implemented on the API side.
    Since:
    14
    • Constructor Detail

      • KeyDefinitionManager

        public KeyDefinitionManager()
    • Method Detail

      • getContextKeyDefinitions

        @Deprecated
        public abstract java.util.List<KeyDefinitionInfo> getContextKeyDefinitions()
        Deprecated.
        For performance reasons, consider implementing the {getContextKeyDefinitionsMap(URL) method instead.
        Get the key definitions which will be used as a context for solving all conkeyref and keyref references in the opened DITA topics. This method might be asked quite often so it could be cached on the implementor's side.
        Returns:
        the key definitions which will be used as a context for solving all conkeyref and keyref references in the opened DITA topics.
      • getContextKeyDefinitions

        @Deprecated
        public java.util.List<KeyDefinitionInfo> getContextKeyDefinitions​(java.net.URL originatorURL)
        Deprecated.
        For performance reasons, consider implementing the {getContextKeyDefinitionsMap(URL) method instead.
        Get the key definitions which will be used as a context for solving all conkeyref and keyref references in the opened DITA topics. This method might be asked quite often so it could be cached on the implementor's side.
        Parameters:
        originatorURL - The DITA topic or map for which the keys are requested to resolve something (either a clicked keyref or a conkeyref).
        Returns:
        the key definitions which will be used as a context for solving all conkeyref and keyref references in the opened DITA topics.
        Since:
        14.2
      • getContextKeyDefinitionsMap

        public java.util.LinkedHashMap<java.lang.String,​KeyDefinitionInfo> getContextKeyDefinitionsMap​(java.net.URL originatorURL)
        Get the key definitions which will be used as a context for solving all conkeyref and keyref references in the opened DITA topics. This method might be asked quite often so it could be cached on the implementor's side.
        Parameters:
        originatorURL - The DITA topic or map for which the keys are requested to resolve something (either a clicked keyref or a conkeyref).
        Returns:
        the key definitions which will be used as a context for solving all conkeyref and keyref references in the opened DITA topics.
        Since:
        22.1
      • getEnumerationDefinitions

        public java.util.LinkedHashSet<EnumerationDefInfo> getEnumerationDefinitions​(java.net.URL originatorURL)
        Get the list of enumeration defs (detected in a subject scheme referenced in the context DITA Map). These are used to control the values allowed for certain attributes. The set can be null. This method might be asked quite often so it could be cached on the implementor's side.
        Parameters:
        originatorURL - The DITA topic or map for which the keys are requested to resolve something (when editing a keyref attribute or using the "Edit Profiling Attributes" dialog).
        Returns:
        the set of enumeration defs (detected in a subject scheme referenced in the context DITA Map).
        Since:
        15
      • getURLKeyScopeContexts

        public java.util.LinkedHashMap<java.net.URL,​java.util.List<java.util.Stack<java.util.Set<java.lang.String>>>> getURLKeyScopeContexts​(java.net.URL originatorURL)
        Retrieve a map between an URL and all the DITA 1.3 key scope contexts in the map where it appears. A key scope context is a stack of collected key scope values. As a key scope set on a topicref may have multiple values, the stack contains sets of keyscope values.
        Parameters:
        originatorURL - The context URL.
        Returns:
        a map between an URL and all the DITA 1.3 key scope contexts in the map where it appears.
        Since:
        17.1
      • getKeyDefinitionForTarget

        public KeyDefinitionInfo getKeyDefinitionForTarget​(java.net.URL originatorURL,
                                                           java.net.URL targetURL)
        Get the key definition corresponding to the target URL. This method may be asked when Oxygen's "Paste as content key reference" action is used or when dropping URLs in the editing area. If it returns null, Oxygen will ask for all keys using the "getContextKeyDefinitions" method and find the key itself.
        Parameters:
        originatorURL - The DITA topic or map for which the keys are requested to resolve something (either a clicked keyref or a conkeyref).
        targetURL - The URL for which we want to know the key which is bound to it.
        Returns:
        the key definition corresponding to the target URL
        Since:
        21
      • getKeyDefinitionForKeyName

        public KeyDefinitionInfo getKeyDefinitionForKeyName​(java.net.URL originatorURL,
                                                            java.lang.String keyName)
        Get the key definition corresponding to the given key name. If it returns null, Oxygen will ask for all keys using the "getContextKeyDefinitions" method and find the key itself.
        Parameters:
        originatorURL - The current DITA topic or map.
        keyName - The key name for which we request the key definition.
        Returns:
        the key definition corresponding to the target URL
        Since:
        21
      • isPassKeyTargetReferencesThroughXMLCatalogMappings

        public boolean isPassKeyTargetReferencesThroughXMLCatalogMappings()
        Return true for the reference URL of each KeyDefinitionInfo to be passed through the application's XML Catalog URI mappings. The default implementation returns true.
        Returns:
        true to pass key reference URLs through XML Catalog URI mappings. Can be useful to provide additional indirections via the XML catalogs support in Oxygen, but this may induce delays when lots of keys are provided by the API.
        Since:
        21.1
      • getDescription

        public java.lang.String getDescription()
        Gets a short description used to explain this resolving to the user.
        Returns:
        A description used to explain this resolving to the user.
        Since:
        15