-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Issue IMCMS-522: Add and update documentation by RB-6
- Add documentation for beans;
- Loading branch information
Victor
authored and
Victor
committed
Sep 29, 2020
1 parent
fdb730d
commit 19ebd76
Showing
15 changed files
with
381 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,6 +9,7 @@ Init ImcmsService - Imcms.getServices(); | |
|
||
service-beans/index | ||
core/index | ||
models/index | ||
|
||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
Classes-JPA | ||
=========== | ||
|
||
Classes JPA are entities. Entity classes are needed to work between the layer services and repositories. | ||
An entity is a lightweight persistence domain object. Typically, an entity represents a table in a relational database, | ||
and each entity instance corresponds to a row in that table. The primary programming artifact of an entity is the entity class, | ||
although entities can use helper classes. | ||
|
||
The persistent state of an entity is represented through either persistent fields or persistent properties. | ||
These fields or properties use object/relational mapping annotations to map the entities and entity relationships | ||
to the relational data in the underlying data store. | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
Classes-DTO | ||
=========== | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
Models-Documentation | ||
==================== | ||
|
||
|
||
.. toctree:: | ||
:titlesonly: | ||
|
||
class-JPA | ||
classes-DTO |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
MailService | ||
=========== | ||
|
||
In this article: | ||
- `Introduction`_ | ||
- `Use API`_ | ||
|
||
|
||
Introduction | ||
------------ | ||
|
||
|
||
Use API | ||
------- | ||
|
||
Init or get instance LoopService over global Imcms.getServices ``Imcms.getServices().getLoopService();`` | ||
|
||
.. code-block:: jsp | ||
Imcms.getServices().getMailService().sendMail(Mail mail); | ||
|
||
|
||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
DocumentUrlService | ||
------------------ | ||
|
||
In this article: | ||
- `Introduction`_ | ||
- `Use API`_ | ||
|
||
|
||
|
||
Introduction | ||
------------ | ||
|
||
Use API | ||
------- | ||
|
||
Init or get instance DocumentUrlService over global Imcms.getServices ``Imcms.getServices().getDocumentUrlService();`` | ||
|
||
.. code-block:: jsp | ||
Imcms.getServices().getDocumentUrlService().getByDocId(int docId); | ||
Imcms.getServices().getDocumentUrlService().save(DocumentURL documentURL); | ||
Imcms.getServices().getDocumentUrlService().copy(int fromDocId, int toDocId); | ||
Imcms.getServices().getDocumentUrlService().removeId(DocumentUrlJPA documentURL, Version version); | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
ImageService | ||
============ | ||
|
||
|
||
In this article: | ||
- `Introduction`_ | ||
- `Use API`_ | ||
|
||
|
||
Introduction | ||
------------ | ||
|
||
Use API | ||
------- | ||
|
||
Init or get instance DocumentUrlService over global Imcms.getServices ``Imcms.getServices().getImageService();`` | ||
|
||
.. code-block:: jsp | ||
Imcms.getServices().getImageService().getImage(ImageDTO dataHolder); | ||
|
||
Imcms.getServices().getImageService().getImage(int docId, int index, String langCode, LoopEntryRef loopEntryRef); | ||
|
||
Imcms.getServices().getImageService().getPublicImage(int docId, int index, String langCode, LoopEntryRef loopEntryRef); | ||
|
||
Imcms.getServices().getImageService().getUsedImagesInWorkingAndLatestVersions(String imageURL); | ||
|
||
Imcms.getServices().getImageService().getImagesAllVersionAndLanguages(int docId, Language language); | ||
|
||
Imcms.getServices().getImageService().saveImage(ImageDTO imageDTO); | ||
|
||
Imcms.getServices().getImageService().deleteByDocId(Integer docIdToDelete); | ||
|
||
Imcms.getServices().getImageService().getPublicImageLinks(int docId, Language language); | ||
|
||
Imcms.getServices().getImageService().deleteImage(ImageDTO imageDTO); | ||
|
||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
LoopService | ||
=========== | ||
|
||
In this article: | ||
- `Introduction`_ | ||
- `Use API`_ | ||
|
||
|
||
Introduction | ||
------------ | ||
|
||
|
||
Use API | ||
------- | ||
|
||
Init or get instance LoopService over global Imcms.getServices ``Imcms.getServices().getLoopService();`` | ||
|
||
.. code-block:: jsp | ||
Imcms.getServices().getLoopService().getLoop(int loopIndex, int docId); | ||
|
||
Imcms.getServices().getLoopService().getLoopPublic(int loopIndex, int docId); | ||
|
||
Imcms.getServices().getLoopService().getLoop(int loopIndex, int docId, Function<Integer, Version> versionGetter); | ||
|
||
Imcms.getServices().getLoopService().saveLoop(Loop loopDTO); | ||
|
||
Imcms.getServices().getLoopService().buildLoopEntryRef(int loopIndex, int entryIndex); | ||
|
||
Imcms.getServices().getLoopService().deleteByDocId(Integer docIdToDelete); | ||
|
||
Imcms.getServices().getLoopService().removeId(LoopJPA dto, Version version); | ||
|
||
Imcms.getServices().getLoopService().createVersionedContent(Version workingVersion, Version newVersion); | ||
|
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
MenuService | ||
=========== | ||
|
||
|
||
In this article: | ||
- `Introduction`_ | ||
- `Use API`_ | ||
|
||
|
||
|
||
Introduction | ||
------------ | ||
|
||
Use API | ||
------- | ||
|
||
Init or get instance MenuService over global Imcms.getServices ``Imcms.getServices().getMenuService();`` | ||
|
||
.. code-block:: jsp | ||
Imcms.getServices().getMenuService().getMenuItems(int docId, int menuIndex, String language, boolean nested, String typeSort) | ||
|
||
Imcms.getServices().getMenuService().getSortedMenuItems(MenuDTO menuDTO, String langCode) | ||
|
||
Imcms.getServices().getMenuService().getVisibleMenuItems(int docId, int menuIndex, String language, boolean nested) | ||
|
||
Imcms.getServices().getMenuService().getPublicMenuItems(int docId, int menuIndex, String language, boolean nested) | ||
|
||
Imcms.getServices().getMenuService().getVisibleMenuAsHtml(int docId, int menuIndex, String language, | ||
boolean nested, String attributes, String treeKey, String wrap) | ||
|
||
Imcms.getServices().getMenuService().getPublicMenuAsHtml(int docId, int menuIndex, String language, | ||
boolean nested, String attributes, String treeKey, String wrap) | ||
|
||
Imcms.getServices().getMenuService().getVisibleMenuAsHtml(int docId, int menuIndex) | ||
|
||
Imcms.getServices().getMenuService().getPublicMenuAsHtml(int docId, int menuIndex) | ||
|
||
Imcms.getServices().getMenuService().saveFrom(MenuDTO menuDTO) | ||
|
||
Imcms.getServices().getMenuService().deleteByVersion(Version version) | ||
|
||
Imcms.getServices().getMenuService().deleteByDocId(Integer docIdToDelete) | ||
|
||
Imcms.getServices().getMenuService().removeId(Menu jpa, Version newVersion) | ||
|
||
Imcms.getServices().getMenuService().getAll(); | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
TemplateService | ||
=============== | ||
|
||
|
||
In this article: | ||
- `Introduction`_ | ||
- `Use API`_ | ||
|
||
|
||
|
||
Introduction | ||
------------ | ||
|
||
Use API | ||
------- | ||
|
||
Init or get instance TemplateService over global Imcms.getServices ``Imcms.getServices().getTemplateService();`` | ||
|
||
.. code-block:: jsp | ||
TemplateService templateService = Imcms.getServices().getTemplateService(); | ||
|
||
List<Template> getAll(); | ||
|
||
templateService.save(Template saveMe); | ||
|
||
File getTemplateDirectory(); | ||
|
||
Optional<Template> get(String name); | ||
|
||
Path getTemplateAdminPath(String templateName); | ||
|
||
Path getPhysicalPathTemplateAdmin(String templateName); | ||
|
||
Path getPhysicalPath(String name); | ||
|
||
Path saveTemplateFile(Template template, byte[] content, OpenOption writeMode); | ||
|
||
void delete(Integer id); | ||
|
||
void replaceTemplateFile(Path oldTemplate, Path newTemplate); | ||
|
||
.. note:: | ||
``replaceTemplateFile`` provide replace all documents which uses old template on newTemplate! | ||
If template exists only one in db, it will throw exception, because we can not delete existing last template! | ||
|
||
.. seealso:: | ||
How to map simple object to JPA/DTO, and how to correct use DTOs classes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
TextDocumentTemplateService | ||
=========================== | ||
|
||
|
||
In this article: | ||
- `Introduction`_ | ||
- `Use API`_ | ||
|
||
|
||
|
||
Introduction | ||
------------ | ||
|
||
Use API | ||
------- | ||
|
||
Init or get instance TextDocumentTemplateService over global Imcms.getServices ``Imcms.getServices().getTextDocumentTemplateService();`` | ||
|
||
.. code-block:: jsp | ||
TextDocumentTemplate save(TextDocumentTemplate saveMe); | ||
|
||
Optional<TextDocumentTemplate> get(int docId); | ||
|
||
List<TextDocumentTemplateDTO> getByTemplateName(String templateName); | ||
|
||
|
||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
UserService | ||
=========== | ||
|
||
|
||
In this article: | ||
- `Introduction`_ | ||
- `Use API`_ | ||
|
||
|
||
|
||
Introduction | ||
------------ | ||
|
||
Use API | ||
------- | ||
|
||
Init or get instance UserService over global Imcms.getServices ``Imcms.getServices().getUserService();`` | ||
|
||
.. code-block:: jsp | ||
Imcms.getServices().getUserService().getUser(int id); | ||
|
||
Imcms.getServices().getUserService().getUser(String login); | ||
|
||
Imcms.getServices().getUserService().updateUser(UserDTO updateData); | ||
|
||
Imcms.getServices().getUserService().getAdminUsers(); | ||
|
||
Imcms.getServices().getUserService().getAllActiveUsers(); | ||
|
||
Imcms.getServices().getUserService().getUsersByEmail(String email); | ||
|
||
Imcms.getServices().getUserService().getUserData(int userId); | ||
|
||
Imcms.getServices().getUserService().saveUser(UserFormData userData); | ||
|
||
Imcms.getServices().getUserService().searchUsers(String searchTerm, Set<Integer> withRoles, boolean includeInactive) | ||
|
||
Imcms.getServices().getUserService().findAll(boolean includeExternal, boolean includeInactive) | ||
|
||
Imcms.getServices().getUserService().findByNamePrefix(String prefix, boolean includeInactive) | ||
|
||
Imcms.getServices().getUserService().saveExternalUser(ExternalUser user) | ||
|
||
|
Oops, something went wrong.