public class HTTPClientAliasManagerWithAutoImport extends java.lang.Object implements SemanticTypeCache, AliasManager
Title: Object Mediation Framework
Description: SemanticTypeCache and AliasManager delegate with auto import of semantic types by name.
Copyright: Copyright (c) 2016
Company: StreamScape Technologies
Constructor and Description |
---|
HTTPClientAliasManagerWithAutoImport(HTTPFabricConnection connection) |
Modifier and Type | Method and Description |
---|---|
void |
alias(SemanticType type)
Adds a
Semantic Type alias to the Alias Map. |
void |
alias(java.lang.String alias,
java.lang.Class type)
Adds a class to the Alias Map.
|
void |
aliasImmutableType(java.lang.Class clazz)
Adds an immutable class to the Alias Map.
|
void |
aliasImmutableType(SemanticType semanticType)
Adds an immutable class to the Alias Map.
|
boolean |
existsSemanticClass(java.lang.Class semanticClass)
Checks if a semantic type associated with the specified class exists.
|
boolean |
existsSemanticClass(java.lang.String className)
Checks if a semantic type associated with the specified class exists.
|
boolean |
existsSemanticType(java.lang.String typeName)
Checks if a semantic with the specified name exists.
|
java.util.Map |
getAncestorTree()
Returns a tree of ancestors for all semantic types.
|
java.util.Map |
getUserAncestorTree()
Returns a tree of ancestors for user-defined semantic types.
|
boolean |
isAliased(java.lang.Class type)
Checks if the specified class is already aliased.
|
boolean |
isAliased(java.lang.String typeName)
Checks if the specified alias already exists.
|
boolean |
isClassAliased(java.lang.String className)
Checks if a class with the specified name is already aliased.
|
boolean |
isImmutableTypeAliased(java.lang.Class clazz)
Checks if the specified class is aliased as an immutable type.
|
boolean |
isInstanceOfAncestor(java.lang.String typeName) |
boolean |
isSemanticTypeDependsOn(java.lang.String typeName,
java.lang.String targetTypeName)
Checks if the specified semantic type depends on the target semantic type.
|
java.util.List |
listAliases()
Returns a list of all aliases.
|
java.util.List |
listComponentSemanticTypes(java.lang.String typeName)
Returns a sorted list of semantic types that are part of the specified type.
|
java.util.List |
listDependentSemanticTypes(java.lang.String typeName)
Returns a sorted list of all semantic types that depend on the specified type.
|
java.util.List |
listDependentUserSemanticTypes(java.lang.String typeName)
Returns a sorted list of all user-defined semantic types that depend on the specified type.
|
java.util.List |
listSemanticTypes()
Returns a sorted list of all semantic types.
|
java.util.List |
listSemanticTypesByAncestor(java.lang.String ancestorName)
Returns a sorted list of all semantic types by the specified ancestor.
|
java.util.List |
listUserSemanticTypes()
Returns a sorted list of all user-defined semantic types.
|
java.util.List |
listUserSemanticTypesByAncestor(java.lang.String ancestorName)
Returns a sorted list of all user-defined semantic types by the specified ancestor.
|
java.lang.String |
lookup(java.lang.Class clazz)
Returns the alias type name associated with the specified class.
|
java.lang.String |
lookup(java.lang.String typeName)
Returns a name of the class associated with the specified alias.
|
SemanticType |
lookupSemanticClass(java.lang.Class semanticClass)
Returns a copy of semantic type associated with the specified class.
|
SemanticType |
lookupSemanticClass(java.lang.String className)
Returns a copy of semantic type associated with the specified class.
|
SemanticType |
lookupSemanticType(java.lang.String typeName)
Returns a copy of semantic type with the specified name.
|
java.lang.String |
resolveClass(java.lang.String className)
Resolves the name of this class to the alias type name.
|
java.lang.String |
resolveSemanticClass(java.lang.Class semanticClass)
Returns a name of the semantic type associated with the specified class.
|
java.lang.String |
resolveSemanticClass(java.lang.String className)
Returns a name of the semantic type associated with the specified class.
|
java.lang.String |
resolveSemanticType(java.lang.String typeName)
Returns a name of the class associated with the specified semantic type.
|
void |
unalias(SemanticType type)
Removes this
Semantic Type from the alias Alias Map. |
void |
unalias(java.lang.String alias)
Removes the aliased type from the Alias Map.
|
public HTTPClientAliasManagerWithAutoImport(HTTPFabricConnection connection)
public java.lang.String resolveSemanticClass(java.lang.Class semanticClass)
SemanticTypeCache
resolveSemanticClass
in interface SemanticTypeCache
semanticClass
- the specified class.public SemanticType lookupSemanticType(java.lang.String typeName)
SemanticTypeCache
lookupSemanticType
in interface SemanticTypeCache
typeName
- the name of semantic type to be found.null
if the type is not found.public SemanticType lookupSemanticClass(java.lang.Class semanticClass)
SemanticTypeCache
lookupSemanticClass
in interface SemanticTypeCache
semanticClass
- the class associated with a type to be found.null
if the type is not found.public SemanticType lookupSemanticClass(java.lang.String className)
SemanticTypeCache
lookupSemanticClass
in interface SemanticTypeCache
className
- the name of class associated with a type to be found.null
if the type is not found.public boolean existsSemanticType(java.lang.String typeName)
SemanticTypeCache
existsSemanticType
in interface SemanticTypeCache
typeName
- the name of semantic type to be checked.true
if the corresponding semantic type exists, false
otherwise.public boolean existsSemanticClass(java.lang.Class semanticClass)
SemanticTypeCache
existsSemanticClass
in interface SemanticTypeCache
semanticClass
- the class to be checked.true
if the corresponding semantic type exists, false
otherwise.public boolean existsSemanticClass(java.lang.String className)
SemanticTypeCache
existsSemanticClass
in interface SemanticTypeCache
className
- the name of class to be checked.true
if the corresponding semantic type exists, false
otherwise.public java.util.List listSemanticTypes()
SemanticTypeCache
listSemanticTypes
in interface SemanticTypeCache
public java.lang.String resolveSemanticType(java.lang.String typeName)
SemanticTypeCache
resolveSemanticType
in interface SemanticTypeCache
typeName
- the name of specified semantic type.public java.lang.String resolveSemanticClass(java.lang.String className)
SemanticTypeCache
resolveSemanticClass
in interface SemanticTypeCache
className
- the name of specified class.public java.util.List listSemanticTypesByAncestor(java.lang.String ancestorName)
SemanticTypeCache
listSemanticTypesByAncestor
in interface SemanticTypeCache
ancestorName
- the specified ancestor name.public java.util.List listUserSemanticTypes()
SemanticTypeCache
listUserSemanticTypes
in interface SemanticTypeCache
public java.util.List listUserSemanticTypesByAncestor(java.lang.String ancestorName)
SemanticTypeCache
listUserSemanticTypesByAncestor
in interface SemanticTypeCache
ancestorName
- the specified ancestor name.public void alias(java.lang.String alias, java.lang.Class type) throws FactoryManagerException
AliasManager
Semantic Type
object which is non-system
and contains an auto-generated serial version id.alias
in interface AliasManager
alias
- the alias to be added.type
- the class to be aliased.FactoryManagerException
- if the specified alias already exists or
if the specified type is already aliased.public void aliasImmutableType(SemanticType semanticType) throws FactoryManagerException
AliasManager
java.lang.String
or collections.aliasImmutableType
in interface AliasManager
semanticType
- the semantic type to be aliased.FactoryManagerException
- if some error occurs.public void aliasImmutableType(java.lang.Class clazz)
AliasManager
java.lang.String
or collections.aliasImmutableType
in interface AliasManager
clazz
- the class to be aliased.public boolean isImmutableTypeAliased(java.lang.Class clazz)
AliasManager
isImmutableTypeAliased
in interface AliasManager
clazz
- the class to be checked.true
if the specified class is aliased as an immutable type, false
otherwise.public void alias(SemanticType type) throws FactoryManagerException
AliasManager
Semantic Type
alias to the Alias Map. Allows for full
control of any semantic types that are added, such as serial version id,
system types and so on. This method does not require the instantiation of
an aliased class.alias
in interface AliasManager
type
- the semantic type to be aliased.FactoryManagerException
- if the specified type is already aliased.public void unalias(SemanticType type) throws FactoryManagerException
AliasManager
Semantic Type
from the alias Alias Map.
unalias
in interface AliasManager
type
- the semantic type to be unaliased.FactoryManagerException
- if the specified type is not aliased or
if the specified type is a system type.public void unalias(java.lang.String alias) throws FactoryManagerException
AliasManager
unalias
in interface AliasManager
alias
- the alias to be removed.FactoryManagerException
- if the specified alias does not exist or
if the specified type is a system type.public java.util.List listAliases()
AliasManager
listAliases
in interface AliasManager
public java.lang.String lookup(java.lang.Class clazz)
AliasManager
lookup
in interface AliasManager
clazz
- the specified class.null
if the class is not aliased.public java.lang.String lookup(java.lang.String typeName)
AliasManager
lookup
in interface AliasManager
typeName
- the specified alias.null
if this alias does not exist.public java.lang.String resolveClass(java.lang.String className)
AliasManager
resolveClass
in interface AliasManager
className
- the specified class name.null
if the class is not aliased.public boolean isAliased(java.lang.String typeName)
AliasManager
isAliased
in interface AliasManager
typeName
- the alias to be checked.true
if the specified alias already exists, false
otherwise.public boolean isAliased(java.lang.Class type)
AliasManager
isAliased
in interface AliasManager
type
- the class to be checked.true
if the specified class is already aliased, false
otherwise.public boolean isClassAliased(java.lang.String className)
AliasManager
isClassAliased
in interface AliasManager
className
- the name of class to be checked.true
if a class with the specified name is already aliased, false
otherwise.public boolean isInstanceOfAncestor(java.lang.String typeName) throws FactoryManagerException
FactoryManagerException
public java.util.List listComponentSemanticTypes(java.lang.String typeName)
SemanticTypeCache
listComponentSemanticTypes
in interface SemanticTypeCache
typeName
- the name of specified semantic type.public java.util.List listDependentSemanticTypes(java.lang.String typeName)
SemanticTypeCache
listDependentSemanticTypes
in interface SemanticTypeCache
typeName
- the name of specified semantic type.public java.util.List listDependentUserSemanticTypes(java.lang.String typeName)
SemanticTypeCache
listDependentUserSemanticTypes
in interface SemanticTypeCache
typeName
- the name of specified semantic type.public boolean isSemanticTypeDependsOn(java.lang.String typeName, java.lang.String targetTypeName)
SemanticTypeCache
false
.isSemanticTypeDependsOn
in interface SemanticTypeCache
typeName
- the name of specified semantic type.targetTypeName
- the name of target semantic type.true
if the specified semantic type depends on the target semantic type, false
otherwise.public java.util.Map getAncestorTree()
SemanticTypeCache
getAncestorTree
in interface SemanticTypeCache
public java.util.Map getUserAncestorTree()
SemanticTypeCache
getUserAncestorTree
in interface SemanticTypeCache
Copyright © 2015-2024 StreamScape Technologies. All rights reserved.