Annotation to put on classes that are entities in the Clarity LIMS.
-
Required Element Summary
Required Elements
The part of the URL that specifies how to list or load entities of the
annotated class.
-
Optional Element Summary
Optional Elements
boolean
Whether entities of the class can be cached.
boolean
If true
, the flag indicates that entities of the annotated type
can be created with a POST.
For some awkward classes that have a similar alternative class for the
creation process, this attribute allows that class used in creation to
be specified.
Specifies the outer entity of the API for which the annotated class
is the inner entity.
boolean
If true
, the flag indicates that entities of the annotated type
can be removed with DELETE.
boolean
Whether the class represents objects that have explicit states (versions)
in the Clarity system.
boolean
If true
, the flag indicates that entities of the annotated type
can be updated with PUT.
Whether the class is a subsection of a base end point.
-
Element Details
-
uriSection
The part of the URL that specifies how to list or load entities of the
annotated class.
For example, the Sample
class can fetch entities via the path
http://blah.com/api/v2/<b>samples</b>/...
. This attribute
of the annotation must specify the "samples" part of the URL.
This has a slightly different meaning when the object requested
is part of another component (steps of protocols, stages of
workflow). Then, this value needs to be the innermost part of the
URI and the primarySection
attribute needs to be set to
the outer part of the API. For example, for a ProtocolStep
this attribute should be set to "steps" and the primarySection
set to the Protocol
class.
- Returns:
- The part of the URL path that yields entities of this type.
- See Also:
-
-
-
creatable
boolean creatable
If true
, the flag indicates that entities of the annotated type
can be created with a POST.
- Returns:
- The creatable flag.
- Default:
- false
-
updateable
boolean updateable
If true
, the flag indicates that entities of the annotated type
can be updated with PUT.
- Returns:
- The updateable flag.
- Default:
- false
-
removable
boolean removable
If true
, the flag indicates that entities of the annotated type
can be removed with DELETE.
- Returns:
- The removable flag.
- Default:
- false
-
uriSubsection
Whether the class is a subsection of a base end point. Examples of this
are process step information classes and the demux information of artifacts.
If this is unset (empty string), then the class is result of the main
API end point, not a subsection.
- Returns:
- The end point URI subsection.
- Default:
- ""
-
cacheable
boolean cacheable
Whether entities of the class can be cached.
- Returns:
- The cacheable flag.
- Default:
- true
-
stateful
boolean stateful
Whether the class represents objects that have explicit states (versions)
in the Clarity system. Such items will usually be returned with a
"state=<number>
" parameter in their URIs.
- Returns:
- The stateful flag.
- Default:
- false
-
creationClass
For some awkward classes that have a similar alternative class for the
creation process, this attribute allows that class used in creation to
be specified. The class given here needs to have a public constructor
that takes a single argument of an instance of the annotated class.
The Sample
and SampleCreation
classes are an example of
this mechanism.
- Returns:
- The alternative class used to create the objects of the normal
type through the API.
It is prohibited in Java to assign a null as the default value of an
annotation, so here the default is the class of the void
type.
Code using this value needs to check that that is not the value set,
rather than null
.
- See Also:
-
- Default:
- void.class
-
primaryEntity
Specifies the outer entity of the API for which the annotated class
is the inner entity. For example, Protocol
when annotating
ProtocolStep
, or Workflow
when annotating Stage
.
- Returns:
- The class to which the annotated class is a part of.
- Since:
- 2.22
- See Also:
-
- Default:
- void.class