Class KeyDefinitionManager

java.lang.Object
ro.sync.exml.workspace.api.editor.page.ditamap.keys.KeyDefinitionManager

@API(type=EXTENDABLE, src=PUBLIC) public abstract class KeyDefinitionManager extends 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 Details

    • KeyDefinitionManager

      public KeyDefinitionManager()
  • Method Details

    • getContextKeyDefinitions

      @Deprecated public abstract 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 List<KeyDefinitionInfo> getContextKeyDefinitions(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 LinkedHashMap<String,KeyDefinitionInfo> getContextKeyDefinitionsMap(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 LinkedHashSet<EnumerationDefInfo> getEnumerationDefinitions(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 LinkedHashMap<URL,List<Stack<Set<String>>>> getURLKeyScopeContexts(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(URL originatorURL, 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(URL originatorURL, 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 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