Namespace $k.Registry
Global object registry API for accessing objects by internal name / ID
- Defined in: Registry.js
Constructor Attributes | Constructor Name and Description |
---|---|
Method Summary
Namespace Detail
$k.Registry
Method Detail
-
Returns the semantic element with an attribute with the specified value, or undefined if there is either no such attribute or more than one
- Parameters:
- {string} internalName
- The internal name of the attribute
- {string} value
- The value to search for
- {string} language Optional
- Language of the value. If not defined, the current language will be used. Ignored if the attribute is not translated
- Throws:
- {$k.exception.InvalidValue}
- If the value is not in the range of allowed values of the attribute
- Returns:
- {$k.SemanticElement}
-
Get the semantic element with the element ID
- Parameters:
- {string} id
- Throws:
- {$k.exception.ObjectNotFound}
- If no element with the ID exists
- {$k.exception.InvalidValue}
- If the ID is not valid
- Returns:
- {$k.SemanticElement}
- See:
- $k.SemanticElement#idNumber
- $k.SemanticElement#idString
-
Get the registered folder
- Parameters:
- {string} folderID
- Registered ID
- Throws:
- {$k.exception.ObjectNotFound}
- If no folder with the ID exists
- Returns:
- {$k.Folder}
-
Get the registered query
- Parameters:
- {string} queryID
- Registered ID
- Throws:
- {$k.exception.ObjectNotFound}
- If no expert query with the ID exists
- Returns:
- {$k.Query}
-
Returns all registered folders
- Returns:
- {$k.Folder[]}
-
<static> {object} $k.Registry.registeredObject(registryType, objectID)Get the registered folder element with the ID from the registry
- Deprecated:
-
Use specific registry accessors, like
query()
orfolder()
- Parameters:
- {string} registryType
- Name of the registry. Corresponds to the value returned by registryType()
- {string} objectID
- Throws:
- {$k.exception.ObjectNotFound}
- If no object with the ID exists
- Returns:
- {object}
- See:
- $k.FolderElement#registryType
-
Returns all registered queries
- Returns:
- {$k.Query[]}
-
Returns all registered semantic collections
- Returns:
- {$k.SemanticCollection[]}
-
Get the registered semantic collection
- Parameters:
- {string} collectionID
- Registered ID
- Throws:
- {$k.exception.ObjectNotFound}
- If no topic collection with the ID exists
- Returns:
- {$k.SemanticCollection}
-
Gets the type with the internal name
- Parameters:
- {string} type
- The internal name of the type
- Throws:
- {$k.exception.ObjectNotFound}
- If no such type exists
- Returns:
- {$k.Type} The type identified by the internal name