Toggle navigation
Toggle navigation
This project
Loading...
Sign in
grogv3
/
grog-cubi
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
Jean-Francois Leveque
2017-01-31 10:02:26 +0100
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
ad41a8ad71694c23db99fa38e36081dd4a47df0b
ad41a8ad
1 parent
52078e05
Clarification PublisherService
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
53 additions
and
8 deletions
src/main/java/org/legrog/web/publisher/PublisherService.java
src/main/java/org/legrog/web/publisher/PublisherService.java
View file @
ad41a8a
...
...
@@ -4,26 +4,71 @@ import org.legrog.entities.Publisher;
import
org.legrog.entities.PublisherAction
;
import
org.legrog.entities.PublisherVersion
;
import
javax.validation.constraints.NotNull
;
import
java.util.List
;
/*
Interface correspondant à la gestion des éditeurs et de leurs versions.
Contient des signatures méthodes d'ajout, de modification et de validation de version ainsi que de restitution.
Interface correspondant à la gestion des éditeurs, de leurs versions et des actions correspondantes.
Contient des signatures pour les méthodes d'ajout, de modification et de validation de version ainsi
que de restitution.
*/
public
interface
PublisherService
{
PublisherVersion
addNewPublisher
(
PublisherVersion
publisherVersion
);
/*
@param PublisherVersion for creation of new Publisher ; has no publisher, author or date time
PublisherVersion
addVersionToPublisher
(
Publisher
publisher
,
PublisherVersion
publisherVersion
);
Creates Publisher, associates it with PublisherVersion and back.
PublisherVersion is completed with author and date time.
Both Publisher and PublisherVersion are persisted.
PublisherAction
validatePublisherVersion
(
PublisherVersion
publisherVersion
);
@return updated PublisherVersion
*/
PublisherVersion
addNewPublisher
(
@NotNull
PublisherVersion
publisherVersion
);
/*
@param Publisher has at least one version
@param PublisherVersion has no publisher, author or date time
Updates Publisher's versions, adding PublisherVersion. Reverse association is also done.
PublisherVersion is completed with author and date time.
Both Publisher and PublisherVersion are persisted.
@return updated PublisherVersion
*/
PublisherVersion
addVersionToPublisher
(
@NotNull
Publisher
publisher
,
@NotNull
PublisherVersion
publisherVersion
);
/*
@param PublisherVersion
Sets PublisherVersion as its Publisher validated version.
Creates the PublisherAction for the validation.
Both Publisher and PublisherAction are persisted.
@return PublisherAction related to the validation
*/
PublisherAction
validatePublisherVersion
(
@NotNull
PublisherVersion
publisherVersion
);
/* @return all persisted PublisherVersions */
List
<
PublisherVersion
>
getAllPublisherVersions
();
PublisherVersion
getPublisherVersion
(
Integer
publisherVersionId
);
/*
@param publisherVersionId
@return PublisherVersion with id publisherVersionId
*/
PublisherVersion
getPublisherVersion
(
@NotNull
Integer
publisherVersionId
);
PublisherAction
getLastValidate
(
Publisher
publisher
);
/*
@param Publisher
@return PublisherAction for Publisher's last validation
*/
PublisherAction
getLastValidate
(
@NotNull
Publisher
publisher
);
/* @return all persisted PublisherAction */
List
<
PublisherAction
>
getAllPublisherActions
();
List
<
PublisherAction
>
getAllPublisherVersionActions
(
PublisherVersion
publisherVersion
);
/*
@param PublisherVersion
@return all PublisherAction on that PublisherVersion
*/
List
<
PublisherAction
>
getAllPublisherVersionActions
(
@NotNull
PublisherVersion
publisherVersion
);
}
...
...
Please
register
or
login
to post a comment