|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IMessageManager
Manages the DEM messages, providing operations for access, pooling and persistence.
Method Summary | |
---|---|
void |
addSupportedLanguage(String language)
Adds a new supported language to the manager. |
MessageList |
collectEntityMessagesFromRepository(Class<?> clazz)
Collect entity messages from resource LanguageID, MessageID, theMessageObject |
MessageList |
collectEntityMessagesFromRepository(Entity type,
Object instance)
Collect entity messages from resource LanguageID, MessageID, theMessageObject |
MessageList |
collectEntityMessagesFromRepository(Entity type,
String id,
String className,
String parentID)
Collect entity messages from resource LanguageID, MessageID, theMessageObject |
MessageList |
collectEntityMessagesFromRepository(String messagePath)
Collect entity messages from resource LanguageID, MessageID, theMessageObject |
MessageList |
getMessageList(Entity type,
IEntity entity)
Gets the messages from the repository and collects them on first use |
MessageList |
getMessageList(IApplication application)
Gets the messages of a given Provider with all translations. |
MessageList |
getMessageList(IProvider provider)
Gets the messages of a given Provider with all translations. |
MessageList |
getMessageList(IService service)
Gets the messages of a given service with all translations. |
MessageList |
getMessageList(IStage stage)
Gets the messages of a given stage with all translations. |
Map<String,String> |
getMessages(IApplication application,
String language)
Gets the messages of a given Application. |
Map<String,String> |
getMessages(IProvider provider,
String language)
Gets the messages of a given Provider. |
Map<String,String> |
getMessages(IService service,
String language)
Gets the messages of a given Service. |
Map<String,String> |
getMessages(IStage stage,
String language)
Gets the messages of a given Stage. |
Set<String> |
getSupportedLanguages()
Returns the list of supported languages. |
void |
invalidateMessages()
Invalidates the messages, forcing their reloading. |
boolean |
isLanguageSupported(String language)
Checks if a given language is supported. |
boolean |
isPersistent()
|
void |
updateMessage(Class<?> clazz,
String messageID,
MessageTranslations message)
Updates a message with a given ID on a given class. |
void |
updateMessage(IEntity entity,
String messageID,
MessageTranslations message)
Updates a message with a given ID on a given entity. |
Method Detail |
---|
void addSupportedLanguage(String language)
language
- the new supported language to addMessageList collectEntityMessagesFromRepository(Class<?> clazz)
clazz
- the class to read the messages from
MessageList collectEntityMessagesFromRepository(Entity type, Object instance)
type
- the type of the entity or null if it's not a DEM entityinstance
- the entity instance
MessageList collectEntityMessagesFromRepository(Entity type, String id, String className, String parentID) throws pt.digitalis.utils.inspection.exception.ResourceNotFoundException
type
- the type of the entity or null if it's not a DEM entityid
- the entity idclassName
- the class nameparentID
- the entity's parent ID
pt.digitalis.utils.inspection.exception.ResourceNotFoundException
- if a needed resource for message collection can't be foundMessageList collectEntityMessagesFromRepository(String messagePath)
messagePath
- the messagePath for the message file (without the ".messages.xx" suffix)
MessageList getMessageList(Entity type, IEntity entity)
type
- the entity typeentity
- the entity object
MessageList getMessageList(IApplication application)
application
- the application for which the messages should be retrieved
MessageList getMessageList(IProvider provider)
provider
- the provider for which the messages should be retrieved
MessageList getMessageList(IService service)
service
- the service for which the messages should be retrieved
MessageList getMessageList(IStage stage)
stage
- the stage for which the messages should be retrieved
Map<String,String> getMessages(IApplication application, String language)
application
- the application for which the messages should be retrievedlanguage
- the language to filter
Map<String,String> getMessages(IProvider provider, String language)
provider
- the provider for which the messages should be retrievedlanguage
- the language to search
Map<String,String> getMessages(IService service, String language)
service
- the service for which the messages should be retrievedlanguage
- the language to filter
Map<String,String> getMessages(IStage stage, String language)
stage
- the stage for which the messages should be retrievedlanguage
- the language to filter
Set<String> getSupportedLanguages()
void invalidateMessages()
boolean isLanguageSupported(String language)
language
- the language to check
boolean isPersistent()
void updateMessage(Class<?> clazz, String messageID, MessageTranslations message)
clazz
- the classmessageID
- the ID of the message to updatemessage
- the message (and it's translations) to updatevoid updateMessage(IEntity entity, String messageID, MessageTranslations message)
entity
- the entitymessageID
- the ID of the message to updatemessage
- the message (and it's translations) to update
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |