X-Git-Url: https://dev.e-taxonomy.eu/gitweb/cdmlib.git/blobdiff_plain/1995f802501b8ca40481adf35241a91107c3c638..8849a7eb10f7d2d587fbccb4610fa7e38c9be78d:/cdmlib-services/src/main/java/eu/etaxonomy/cdm/api/service/IVersionableService.java diff --git a/cdmlib-services/src/main/java/eu/etaxonomy/cdm/api/service/IVersionableService.java b/cdmlib-services/src/main/java/eu/etaxonomy/cdm/api/service/IVersionableService.java index 369cd5f894..0d67d83c0b 100644 --- a/cdmlib-services/src/main/java/eu/etaxonomy/cdm/api/service/IVersionableService.java +++ b/cdmlib-services/src/main/java/eu/etaxonomy/cdm/api/service/IVersionableService.java @@ -1,9 +1,8 @@ -// $Id$ /** * Copyright (C) 2007 EDIT - * European Distributed Institute of Taxonomy + * European Distributed Institute of Taxonomy * http://www.e-taxonomy.eu - * + * * The contents of this file are subject to the Mozilla Public License Version 1.1 * See LICENSE.TXT at the top of this package for the full license terms. */ @@ -11,26 +10,26 @@ package eu.etaxonomy.cdm.api.service; import java.util.List; +import java.util.UUID; import org.hibernate.envers.query.criteria.AuditCriterion; import eu.etaxonomy.cdm.api.service.config.DeleteConfiguratorBase; import eu.etaxonomy.cdm.api.service.pager.Pager; -import eu.etaxonomy.cdm.model.common.CdmBase; import eu.etaxonomy.cdm.model.common.VersionableEntity; import eu.etaxonomy.cdm.model.view.AuditEvent; import eu.etaxonomy.cdm.model.view.AuditEventRecord; import eu.etaxonomy.cdm.persistence.dao.common.AuditEventSort; public interface IVersionableService extends IService { - + /** * Returns a paged list of audit events (in order) which affected the state of an entity t. - * The events returned either start at the AuditEvent in context and go forward in time - * (AuditEventSort.FORWARDS) or backwards in time (AuditEventSort.BACKWARDS). If the + * The events returned either start at the AuditEvent in context and go forward in time + * (AuditEventSort.FORWARDS) or backwards in time (AuditEventSort.BACKWARDS). If the * AuditEventContext is set to null, or to AuditEvent.CURRENT_VIEW, then all relevant * AuditEvents are returned. - * + * * @param t * @param pageSize * @param pageNumber @@ -39,47 +38,47 @@ public interface IVersionableService extends IServi * @return a Pager containing audit event instances, plus metadata */ public Pager> pageAuditEvents(T t, Integer pageSize, Integer pageNumber, AuditEventSort sort, List propertyPaths); - + /** * A convenience method which returns a record of the next (relative to the audit event in context) * audit event to affect the entity t. - * + * * @param t The versionable entity affected by these audit events * @return a record of the next audit event to affect t, or null if the current event is the last to affect t */ public AuditEventRecord getNextAuditEvent(T t); - + /** * A convenience method which returns a record of the previous (relative to the audit event in context) * audit event to affect the entity t. - * + * * @param t The versionable entity affected by these audit events * @return a record of the previous audit event to affect t, or null if the current event is the first to affect t */ public AuditEventRecord getPreviousAuditEvent(T t); - + /** * Returns a list of all audit events occurring to objects of type T, optionally restricted to objects of type clazz * between the AuditEvents from and to, inclusive, optionally filtered by other criteria - * + * * @param clazz Restrict the results returned to objects of this class * @param from The audit event to start from (inclusive, or pass null to start from the beginning of the recordset) * @param to The audit event to continue until (exclusive, or pass null to return audit events up to the time of the query) * @param criteria Extra criteria to filter by * @param pageSize The maximum number of objects returned (can be null for all matching objects) - * @param pageNumber The offset (in pageSize chunks) from the start of the result set (0 - based, + * @param pageNumber The offset (in pageSize chunks) from the start of the result set (0 - based, * can be null, equivalent of starting at the beginning of the recordset) * @param sort Sort the events either forwards or backwards in time * @param propertyPaths properties to be initialized * @return */ public Pager> pageAuditEvents(Class clazz,AuditEvent from,AuditEvent to, List criteria, Integer pageSize, Integer pageValue, AuditEventSort sort,List propertyPaths); - + /** * checks whether the object is deletable concerning the configurator or not */ - - public List isDeletable(T object, DeleteConfiguratorBase config); - + + public DeleteResult isDeletable(UUID object, DeleteConfiguratorBase config); + }