package org.splat.service;
-import java.util.List;
-
import org.splat.dal.bo.som.ConvertsRelation;
import org.splat.dal.bo.som.Document;
import org.splat.dal.bo.som.DocumentType;
import org.splat.dal.bo.som.Document.Properties;
import org.splat.kernel.InvalidPropertyException;
import org.splat.kernel.MissedPropertyException;
-import org.splat.kernel.MultiplyDefinedException;
import org.splat.kernel.NotApplicableException;
-import org.splat.service.technical.ProjectSettingsService;
import org.splat.som.Revision;
import org.splat.som.Step;
-import org.springframework.transaction.annotation.Transactional;
/**
* Document service interface.
* the document path
* @return the document if found or null
*/
- public Document getDocumentByPath(String path);
+ Document getDocumentByPath(String path);
/**
* Defines this document.
* @see Step#createDocument(Properties)
* @see #isUndefined()
*/
- public void initialize(Document aDoc, Properties dprop)
+ void initialize(Document aDoc, Properties dprop)
throws MissedPropertyException, InvalidPropertyException,
NotApplicableException;
* document id
* @return found document
*/
- public Document selectDocument(long index);
+ Document selectDocument(long index);
/**
* Find a document by its reference and version.
* document version
* @return found document
*/
- public Document selectDocument(String refid, String version);
+ Document selectDocument(String refid, String version);
/**
* Generate document reference.
* @param dprop
* document properties (owner project element is used)
*/
- public void generateDocumentId(Document aDoc, Properties dprop);
+ void generateDocumentId(Document aDoc, Properties dprop);
/**
* Get a directory where the document file is saved.
* the document
* @return a directory
*/
- public java.io.File getSaveDirectory(Document aDoc);
+ java.io.File getSaveDirectory(Document aDoc);
/**
* Extract title and reference properties from the given file.
* the file to parse
* @return the extracted properties
*/
- public Properties extractProperties(java.io.File file);
+ Properties extractProperties(java.io.File file);
/**
* Create "Converts" relation for the given document and the given format.
* the format
* @return the created "Converts" relation
*/
- public ConvertsRelation attach(Document aDoc, String format);
+ ConvertsRelation attach(Document aDoc, String format);
/**
* Create "Converts" relation for the given document, format and description.
* the description of the relation
* @return the created "Converts" relation
*/
- public ConvertsRelation attach(Document aDoc, String format,
+ ConvertsRelation attach(Document aDoc, String format,
String description);
/**
* the original document
* @return true if the new reference is set
*/
- public boolean buildReferenceFrom(Document aDoc, ProjectElement scope,
+ boolean buildReferenceFrom(Document aDoc, ProjectElement scope,
Document lineage);
/**
* the study
* @return true if the new reference is set
*/
- public boolean buildReferenceFrom(Document aDoc, Study scope);
+ boolean buildReferenceFrom(Document aDoc, Study scope);
/**
* Demote a document.
* the document to demote
* @return true if demoting succeeded
*/
- public boolean demote(Document aDoc);
+ boolean demote(Document aDoc);
/**
* Promote a document.
* the timestamp of the promotion
* @return true if promotion succeeded
*/
- public boolean promote(Document aDoc, Timestamp stamp);
+ boolean promote(Document aDoc, Timestamp stamp);
/**
* Increments the reference count of this document following its publication in a Study step.
* the document to hold
* @see #release()
*/
- public void hold(Document aDoc);
+ void hold(Document aDoc);
/**
* Decrements the reference count of this document following the removal of a Publication from a Study step.
* the document to release
* @see #hold()
*/
- public void release(Document aDoc);
+ void release(Document aDoc);
/**
* Rename a document.
* @throws InvalidPropertyException
* if the new title is empty
*/
- public void rename(Document aDoc, String title)
+ void rename(Document aDoc, String title)
throws InvalidPropertyException;
/**
* @param newvers
* the new version
*/
- public void updateAs(Document aDoc, Revision newvers);
+ void updateAs(Document aDoc, Revision newvers);
/**
* Update a state of the given document.
* @param state
* the new state
*/
- public void updateAs(Document aDoc, ProgressState state);
+ void updateAs(Document aDoc, ProgressState state);
/**
* Checks if documents of this type are result of a study. A document is the result of a study when it is the result of the last step of
* @see #isStepResult()
* @see #isResultOf(org.splat.service.technical.ProjectSettingsServiceImpl.Step)
*/
- public boolean isStudyResult(DocumentType aType);
+ boolean isStudyResult(DocumentType aType);
}