Package org.imixs.workflow.office.config
Class TextBlockService
java.lang.Object
org.imixs.workflow.office.config.TextBlockService
@DeclareRoles({"org.imixs.ACCESSLEVEL.NOACCESS","org.imixs.ACCESSLEVEL.READERACCESS","org.imixs.ACCESSLEVEL.AUTHORACCESS","org.imixs.ACCESSLEVEL.EDITORACCESS","org.imixs.ACCESSLEVEL.MANAGERACCESS"})
@RolesAllowed({"org.imixs.ACCESSLEVEL.NOACCESS","org.imixs.ACCESSLEVEL.READERACCESS","org.imixs.ACCESSLEVEL.AUTHORACCESS","org.imixs.ACCESSLEVEL.EDITORACCESS","org.imixs.ACCESSLEVEL.MANAGERACCESS"})
public class TextBlockService
extends Object
The TextBlockService is an EJB handling documents containing textual
information. A text-block document is identified by its ID (txtname) and
holds a HTML or PlainText information.
A text-block document holds the following items
- txtmode - html/text
- txtcontent - textual information
- Author:
- rsoika
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddeleteTextBlock(org.imixs.workflow.ItemCollection aconfig) This method deletes an existing text-block.org.imixs.workflow.ItemCollectionloadTextBlock(String name) This method returns a text-block ItemCollection for a specified name or ID.org.imixs.workflow.ItemCollectionloadTextBlock(String name, boolean discardCache) This method returns a text-block ItemCollection for a specified name or id.voidonDocumentEvent(org.imixs.workflow.engine.DocumentEvent event) This method refreshes the cache if a textblock was saved.voidonTextEvent(org.imixs.workflow.engine.TextEvent event) This method reacts on CDI events of the type TextEvent and parses a string for xml tag. org.imixs.workflow.ItemCollectionsave(org.imixs.workflow.ItemCollection textBlockItemCollection) SavesO the text-block entity
-
Constructor Details
-
TextBlockService
public TextBlockService()
-
-
Method Details
-
deleteTextBlock
public void deleteTextBlock(org.imixs.workflow.ItemCollection aconfig) throws org.imixs.workflow.exceptions.AccessDeniedException This method deletes an existing text-block.- Parameters:
aconfig-- Throws:
org.imixs.workflow.exceptions.AccessDeniedException
-
loadTextBlock
This method returns a text-block ItemCollection for a specified name or ID. If no text-block is found for this name the Method creates an empty text-block object. The text-block entity is cached internally and read from the cache- Parameters:
name- in attribute txtname
-
loadTextBlock
This method returns a text-block ItemCollection for a specified name or id. If no text-block is found for this name the Method creates an empty text-block object. The text-block entity is cached internally.- Parameters:
name- in attribute txtnamediscardCache- - indicates if the internal cache should be discarded.
-
save
public org.imixs.workflow.ItemCollection save(org.imixs.workflow.ItemCollection textBlockItemCollection) throws org.imixs.workflow.exceptions.AccessDeniedException SavesO the text-block entity- Returns:
- Throws:
org.imixs.workflow.exceptions.AccessDeniedException
-
onTextEvent
public void onTextEvent(@Observes @Priority(2600) org.imixs.workflow.engine.TextEvent event) This method reacts on CDI events of the type TextEvent and parses a string for xml tag. Those tags will be replaced with the corresponding system property value. The priority of the CDI event is set to (APPLICATION+10) to ensure that the textblock adapter is triggered after the TextItemValueAdapter
-
onDocumentEvent
public void onDocumentEvent(@Observes org.imixs.workflow.engine.DocumentEvent event) This method refreshes the cache if a textblock was saved.- Parameters:
event-
-