public interface TypeLookupSession extends OsidSession
This session retrieves Types. A single Type can be retrieved using
getType()
and all types known to this service can be
accessed via getTypes()
.
Modifier and Type | Method and Description |
---|---|
boolean |
canLookupTypes()
Tests if this user can perform
Type lookups. |
TypeList |
getBaseTypes(Type type)
Gets the immediate base types of this type.
|
TypeList |
getDestinationTypesByRelationType(Type relationType)
Gets all destination
Types related by the given type. |
TypeList |
getDestinationTypesBySource(Type sourceType)
Gets all destination Types related to the given source
Type. |
TypeList |
getDestinationTypesBySourceAndRelationType(Type sourceType,
Type relationType)
Gets all destination Types related to the given source
Type
and relation Type. |
TypeList |
getRelationTypes()
Gets all known relation
Types. |
TypeList |
getSourceTypesByDestination(Type destinationType)
Gets all source Types related to the given destination
Type. |
TypeList |
getSourceTypesByDestinationAndRelationType(Type destinationType,
Type relationType)
Gets all source Types related to the given destination
Type
and relation Type. |
TypeList |
getSourceTypesByRelationType(Type relationType)
Gets all source
Types related by the given type. |
Type |
getType(java.lang.String namespace,
java.lang.String identifier,
java.lang.String authority)
Gets a
Type by its string representation which is a
combination of the authority and identifier. |
TypeList |
getTypes()
Gets all the known Types.
|
TypeList |
getTypesByAuthority(java.lang.String authority)
Gets all the known Types by authority.
|
TypeList |
getTypesByDomain(java.lang.String domain)
Gets all the known Types by domain.
|
TypeList |
getTypesByDomainAndAuthority(java.lang.String domain,
java.lang.String authority)
Gets all the known Types by domain and authority.
|
boolean |
hasBaseType(Type type)
Tests if the given type is derived from a base type.
|
boolean |
hasType(Type type)
Tests if the given
Type is known. |
boolean |
impliesSupport(Type type,
Type baseType)
Tests if the given type is implies support of a base type.
|
boolean |
isEquivalent(Type type,
Type equivalentType)
Tests if the given types are equivalent.
|
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactions
close
boolean canLookupTypes()
Type
lookups. A return
of true does not guarantee successful authorization. A return of false
indicates that it is known all methods in this session will result in
a PERMISSION_DENIED.
This is intended as a hint to an
application that may opt not to offer lookup operations. false
if lookup methods are not authorized,
true
otherwisemandatory
- This method must be implemented. Type getType(java.lang.String namespace, java.lang.String identifier, java.lang.String authority) throws NotFoundException, OperationFailedException, PermissionDeniedException
Type
by its string representation which is a
combination of the authority and identifier. This method only returns
the Type
if it is known by the given identification
components.namespace
- the identifier namespaceidentifier
- the identifierauthority
- the authority Type
NotFoundException
- the type is not foundNullArgumentException
- null
argument
providedOperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. boolean hasType(Type type) throws OperationFailedException, PermissionDeniedException
Type
is known.type
- the Type
to look for true
if the given Type
is known,
false
otherwiseNullArgumentException
- type
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. TypeList getTypesByDomain(java.lang.String domain) throws OperationFailedException, PermissionDeniedException
domain
- the domain Types
with the given domainNullArgumentException
- domain
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. TypeList getTypesByAuthority(java.lang.String authority) throws OperationFailedException, PermissionDeniedException
authority
- the authority Types
with the given authorityNullArgumentException
- authority
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- respect my authoritaymandatory
- This method must be implemented. TypeList getTypesByDomainAndAuthority(java.lang.String domain, java.lang.String authority) throws OperationFailedException, PermissionDeniedException
domain
- the domainauthority
- the authority Types
with the given domain and
authorityNullArgumentException
- domain
or
authority
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. TypeList getTypes() throws OperationFailedException, PermissionDeniedException
Types
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. boolean isEquivalent(Type type, Type equivalentType) throws OperationFailedException, PermissionDeniedException
type
- a typeequivalentType
- another type true
if both types are equivalent, false
otherwiseNullArgumentException
- type
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. boolean impliesSupport(Type type, Type baseType) throws OperationFailedException, PermissionDeniedException
type
- a typebaseType
- another type true
if baseType
if supported by
type,
false
otherwiseNullArgumentException
- type
or
baseType
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. boolean hasBaseType(Type type) throws OperationFailedException, PermissionDeniedException
type
- a type true
is the given type is derived from a base
type, false
otherwiseNullArgumentException
- type
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. TypeList getBaseTypes(Type type) throws OperationFailedException, PermissionDeniedException
type
- a typeNullArgumentException
- type
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. TypeList getRelationTypes() throws OperationFailedException, PermissionDeniedException
Types.
A relation Types relates
two Types.
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. TypeList getSourceTypesByRelationType(Type relationType) throws OperationFailedException, PermissionDeniedException
Types
related by the given type.relationType
- a relation typeNullArgumentException
- relationType
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. TypeList getDestinationTypesBySource(Type sourceType) throws OperationFailedException, PermissionDeniedException
Type.
sourceType
- a source typeNullArgumentException
- sourceType
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. TypeList getDestinationTypesBySourceAndRelationType(Type sourceType, Type relationType) throws OperationFailedException, PermissionDeniedException
Type
and relation Type.
sourceType
- a source typerelationType
- a relation typeNullArgumentException
- sourceType
or
relationType
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. TypeList getDestinationTypesByRelationType(Type relationType) throws OperationFailedException, PermissionDeniedException
Types
related by the given type.relationType
- a relation typeNullArgumentException
- relationType
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. TypeList getSourceTypesByDestination(Type destinationType) throws OperationFailedException, PermissionDeniedException
Type.
destinationType
- a destination typeNullArgumentException
- destinationType
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. TypeList getSourceTypesByDestinationAndRelationType(Type destinationType, Type relationType) throws OperationFailedException, PermissionDeniedException
Type
and relation Type.
destinationType
- a destination typerelationType
- a relation typeNullArgumentException
- destinationType
or relationType
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented.