.. java:import:: java.lang.reflect InvocationTargetException .. java:import:: java.util HashMap .. java:import:: java.util LinkedList .. java:import:: java.util List .. java:import:: java.util Map .. java:import:: java.util Objects .. java:import:: java.util Set .. java:import:: org.apache.shiro.subject Subject .. java:import:: org.caosdb.server CaosDBException .. java:import:: org.caosdb.server.database BackendTransaction .. java:import:: org.caosdb.server.database.backend.transaction GetIDByName .. java:import:: org.caosdb.server.database.backend.transaction IsSubType .. java:import:: org.caosdb.server.database.backend.transaction RetrieveSparseEntity .. java:import:: org.caosdb.server.database.exceptions EntityDoesNotExistException .. java:import:: org.caosdb.server.database.exceptions EntityWasNotUniqueException .. java:import:: org.caosdb.server.database.exceptions TransactionException .. java:import:: org.caosdb.server.datatype AbstractCollectionDatatype .. java:import:: org.caosdb.server.datatype AbstractDatatype .. java:import:: org.caosdb.server.datatype ReferenceDatatype2 .. java:import:: org.caosdb.server.entity EntityID .. java:import:: org.caosdb.server.entity EntityInterface .. java:import:: org.caosdb.server.entity Message .. java:import:: org.caosdb.server.entity Version .. java:import:: org.caosdb.server.entity.container TransactionContainer .. java:import:: org.caosdb.server.entity.wrapper Parent .. java:import:: org.caosdb.server.jobs.core JobFailureSeverity .. java:import:: org.caosdb.server.transaction Transaction .. java:import:: org.caosdb.server.utils EntityStatus .. java:import:: org.reflections Reflections Job === .. java:package:: org.caosdb.server.jobs :noindex: .. java:type:: public abstract class Job This is a Job. Fields ------ allClasses ^^^^^^^^^^ .. java:field:: static HashMap> allClasses :outertype: Job All known Job classes, by name (actually lowercase getSimpleName()). Constructors ------------ Job ^^^ .. java:constructor:: protected Job() :outertype: Job Methods ------- appendJob ^^^^^^^^^ .. java:method:: protected ScheduledJob appendJob(Class clazz) :outertype: Job appendJob ^^^^^^^^^ .. java:method:: protected ScheduledJob appendJob(EntityInterface entity, Class clazz) :outertype: Job equals ^^^^^^ .. java:method:: @Override public boolean equals(Object obj) :outertype: Job execute ^^^^^^^ .. java:method:: protected K execute(K t) :outertype: Job getCache ^^^^^^^^ .. java:method:: protected Map getCache(String name) :outertype: Job getContainer ^^^^^^^^^^^^ .. java:method:: protected TransactionContainer getContainer() :outertype: Job getEntity ^^^^^^^^^ .. java:method:: public EntityInterface getEntity() :outertype: Job getEntityById ^^^^^^^^^^^^^ .. java:method:: protected EntityInterface getEntityById(EntityID id) :outertype: Job getEntityByName ^^^^^^^^^^^^^^^ .. java:method:: protected EntityInterface getEntityByName(String name) :outertype: Job getFailureSeverity ^^^^^^^^^^^^^^^^^^ .. java:method:: protected final JobFailureSeverity getFailureSeverity() :outertype: Job getJob ^^^^^^ .. java:method:: public static Job getJob(String job, JobFailureSeverity severiy, EntityInterface entity, Transaction transaction) :outertype: Job Create a Job object with the given parameters. This static method is used by other classes to create Job objects, instead of the private constructor. :return: The generated Job object. getRequestId ^^^^^^^^^^^^ .. java:method:: protected String getRequestId() :outertype: Job getTarget ^^^^^^^^^ .. java:method:: public abstract JobTarget getTarget() :outertype: Job getTransaction ^^^^^^^^^^^^^^ .. java:method:: public Transaction getTransaction() :outertype: Job getTransactionStage ^^^^^^^^^^^^^^^^^^^ .. java:method:: public TransactionStage getTransactionStage() :outertype: Job getUser ^^^^^^^ .. java:method:: protected Subject getUser() :outertype: Job hashCode ^^^^^^^^ .. java:method:: @Override public int hashCode() :outertype: Job init ^^^^ .. java:method:: public final Job init(JobFailureSeverity severity, EntityInterface entity, Transaction transaction) :outertype: Job isSubType ^^^^^^^^^ .. java:method:: protected final boolean isSubType(EntityInterface child, EntityInterface targetParent) throws EntityWasNotUniqueException :outertype: Job Check if an entity ('child') is a direct or indirect child of another entity ('targetParent'). This assumes that the parent has either an id (persistent or temporary) or a name. If the targetParent is not in the set of parents of the child, this method iterates through the direct parents of the child. If both entities are part of this transaction, they are resolved within this transaction. Otherwise they are fetched from the database backend or the whole evaluation takes place in the backend (if both have persistent ids and are not part of this transaction). If both entities have the same id or name, the return value is true without any further checks. :param child: the child entity :param targetParent: the parent entity :throws Message: :return: true iff targetParent is a direct or indirect parent of the child or when the ids or names match. isValidSubType ^^^^^^^^^^^^^^ .. java:method:: protected final boolean isValidSubType(EntityID child, EntityID parent) :outertype: Job loadDataTypeSpecificJobs ^^^^^^^^^^^^^^^^^^^^^^^^ .. java:method:: protected List loadDataTypeSpecificJobs() :outertype: Job loadDataTypeSpecificJobs ^^^^^^^^^^^^^^^^^^^^^^^^ .. java:method:: public List loadDataTypeSpecificJobs(EntityInterface entity, Transaction transaction) :outertype: Job loadJobs ^^^^^^^^ .. java:method:: public List loadJobs(EntityInterface entity, Transaction transaction) :outertype: Job loadPermanentContainerJobs ^^^^^^^^^^^^^^^^^^^^^^^^^^ .. java:method:: public static List loadPermanentContainerJobs(Transaction transaction) :outertype: Job Return those matching jobs which are annotated with the "loadAlways" attribute. :return: A list with the jobs. loadStandardJobs ^^^^^^^^^^^^^^^^ .. java:method:: public List loadStandardJobs(EntityInterface entity, Transaction transaction) :outertype: Job resolve ^^^^^^^ .. java:method:: protected EntityInterface resolve(EntityInterface entity) throws EntityWasNotUniqueException :outertype: Job Resolve an entity (which might only be specified by it's name or id) to its full representation (with properties, parents and all). :param entity: the entity to be resolved. :throws EntityWasNotUniqueException: if the resolution failed due to ambiguity of the name. :return: the resolved entity. resolve ^^^^^^^ .. java:method:: protected EntityInterface resolve(EntityID id) :outertype: Job resolve ^^^^^^^ .. java:method:: protected EntityInterface resolve(EntityID id, String name, String versionId) throws EntityDoesNotExistException, EntityWasNotUniqueException :outertype: Job resolve ^^^^^^^ .. java:method:: protected EntityInterface resolve(EntityID id, String name, Version version) :outertype: Job retrieveValidIDByName ^^^^^^^^^^^^^^^^^^^^^ .. java:method:: protected final EntityID retrieveValidIDByName(String name, String version) :outertype: Job run ^^^ .. java:method:: protected abstract void run() throws Message :outertype: Job to be overridden runJobFromSchedule ^^^^^^^^^^^^^^^^^^ .. java:method:: protected void runJobFromSchedule(EntityInterface entity, Class jobclass) :outertype: Job setFailureSeverity ^^^^^^^^^^^^^^^^^^ .. java:method:: protected final void setFailureSeverity(JobFailureSeverity severiy) :outertype: Job toString ^^^^^^^^ .. java:method:: @Override public String toString() :outertype: Job