Package com.abstratt.kirra
Interface SchemaManagement
-
- All Known Subinterfaces:
Repository
- All Known Implementing Classes:
SchemaManagementSnapshot
public interface SchemaManagement
Provides access to various pieces of information about a schema.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description List<Entity>
getAllEntities()
default List<TypeRef>
getAllEntityRefs()
List<Service>
getAllServices()
List<TupleType>
getAllTupleTypes()
default String
getApplicationLabel()
The human-friendly title of the application.default String
getApplicationLogo()
The logo of the application, as a base64-encoded string.String
getApplicationName()
The name of the application.String
getBuild()
The current build of the application.List<Entity>
getEntities(String namespace)
Returns all entities in the namespace, or across all namespaces.Entity
getEntity(TypeRef typeRef)
Entity
getEntity(String namespace, String name)
Returns the entity with the given name.Collection<TypeRef>
getEntityNames()
List<Operation>
getEntityOperations(String namespace, String name)
Returns the operations available for the given entity type.List<Property>
getEntityProperties(String namespace, String name)
Returns the properties available for the given entity type.List<Relationship>
getEntityRelationships(String namespace, String name)
Returns the relationships available for the given entity type.Namespace
getNamespace(String namespaceName)
Returns the namespace with the given name.List<String>
getNamespaces()
Relationship
getOpposite(Relationship relationship)
default Collection<Entity>
getRoleEntities()
Returns all entities that represent roles.default List<Entity>
getRoleEntities(String namespace)
Returns the entities in the application that represent roles.Schema
getSchema()
Returns the entire schema at once.Service
getService(TypeRef typeRef)
Service
getService(String namespace, String name)
List<Service>
getServices(String namespace)
default List<Entity>
getSubEntities(TypeRef baseEntity)
Returns all entities that have the give base entity as their super entity.List<Entity>
getTopLevelEntities(String namespace)
TupleType
getTupleType(TypeRef typeRef)
TupleType
getTupleType(String namespace, String name)
List<TupleType>
getTupleTypes(String namespace)
-
-
-
Method Detail
-
getApplicationName
String getApplicationName()
The name of the application.
-
getApplicationLabel
default String getApplicationLabel()
The human-friendly title of the application.
-
getApplicationLogo
default String getApplicationLogo()
The logo of the application, as a base64-encoded string.
-
getBuild
String getBuild()
The current build of the application.
-
getEntities
List<Entity> getEntities(String namespace)
Returns all entities in the namespace, or across all namespaces.- Parameters:
namespace
- the namespace, ornull
for all- Returns:
- the list of entities found
-
getRoleEntities
default List<Entity> getRoleEntities(String namespace)
Returns the entities in the application that represent roles.
-
getSubEntities
default List<Entity> getSubEntities(TypeRef baseEntity)
Returns all entities that have the give base entity as their super entity.- Parameters:
baseEntity
-- Returns:
-
getEntity
Entity getEntity(String namespace, String name)
Returns the entity with the given name. Returns null a corresponding class does not exist, or if it is not an entity.- Parameters:
namespace
-name
-- Returns:
- the corresponding entity, or
null
-
getEntityNames
Collection<TypeRef> getEntityNames()
-
getRoleEntities
default Collection<Entity> getRoleEntities()
Returns all entities that represent roles.
-
getEntityOperations
List<Operation> getEntityOperations(String namespace, String name)
Returns the operations available for the given entity type.
-
getEntityProperties
List<Property> getEntityProperties(String namespace, String name)
Returns the properties available for the given entity type.
-
getEntityRelationships
List<Relationship> getEntityRelationships(String namespace, String name)
Returns the relationships available for the given entity type.
-
getNamespace
Namespace getNamespace(String namespaceName)
Returns the namespace with the given name.
-
getSchema
Schema getSchema()
Returns the entire schema at once.
-
getOpposite
Relationship getOpposite(Relationship relationship)
-
-