MetaModelService (interface)

This service provides a formal API into the framework’s metamodel.

API

MetaModelService.java
interface MetaModelService {
  Class<?> fromObjectType(final String objectType)     (1)
  String toObjectType(final Class<?> domainType)     (2)
  void rebuild(final Class<?> domainType)     (3)
  DomainModel getDomainModel()     (4)
  BeanSort sortOf(Class<?> domainType, Mode mode)     (5)
  BeanSort sortOf(Bookmark bookmark, Mode mode)     (6)
  CommandDtoProcessor commandDtoProcessorFor(String logicalMemberIdentifier)     (7)
  MetamodelDto exportMetaModel(final Config config)     (8)
}
1 fromObjectType(String)

Provides a reverse lookup of a domain class' object type, as defined by DomainObject#objectType() (or any other mechanism that corresponds to Isis' ObjectSpecIdFacet ).

2 toObjectType(Class)

Provides a lookup of a domain class' object type, as defined by DomainObject#objectType() (or any other mechanism that corresponds to Isis' ObjectSpecIdFacet ).

3 rebuild(Class)

Invalidates and rebuilds the internal metadata for the specified domain type.

4 getDomainModel()

Returns a list of representations of each of member of each domain class.

5 sortOf(Class, Mode)

What sort of object the domain type represents.

6 sortOf(Bookmark, Mode)

Override of #sortOf(Class, Mode) , extracting the domain type from the provided Bookmark of a domain object instance.

7 commandDtoProcessorFor(String)

Obtains the implementation of CommandDtoProcessor (if any) as per Action#commandDtoProcessor() or Property#commandDtoProcessor() .

8 exportMetaModel(Config)

Exports the entire metamodel as a DTO, serializable into XML using JAXB.

Members

fromObjectType(String)

Provides a reverse lookup of a domain class' object type, as defined by DomainObject#objectType() (or any other mechanism that corresponds to Isis' ObjectSpecIdFacet ).

toObjectType(Class)

Provides a lookup of a domain class' object type, as defined by DomainObject#objectType() (or any other mechanism that corresponds to Isis' ObjectSpecIdFacet ).

rebuild(Class)

Invalidates and rebuilds the internal metadata for the specified domain type.

getDomainModel()

Returns a list of representations of each of member of each domain class.

Used by MetaModelServiceMenu to return a downloadable CSV.

Note that MetaModelService#exportMetaModel(Config) provides a superset of the functionality provided by this method.

sortOf(Class, Mode)

What sort of object the domain type represents.

sortOf(Bookmark, Mode)

Override of #sortOf(Class, Mode) , extracting the domain type from the provided Bookmark of a domain object instance.

commandDtoProcessorFor(String)

Obtains the implementation of CommandDtoProcessor (if any) as per Action#commandDtoProcessor() or Property#commandDtoProcessor() .

This is used by framework-provided implementations of org.apache.isis.applib.services.conmap.ContentMappingService .

exportMetaModel(Config)

Exports the entire metamodel as a DTO, serializable into XML using JAXB.

The Config parameter can be used to restrict/filter the export to some subset of the metamodel; in particular to specific Config#getPackagePrefixes() package prefixes .

Implementation

The framework provides a default implementation of this service, o.a.i.core.metamodel.services.metamodel.MetaModelServiceDefault.

See also