|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object pt.digitalis.dif.dem.managers.impl.AbstractMessageManager
public abstract class AbstractMessageManager
Manages the DEM messages, providing operations for access, pooling and persistence.
Field Summary | |
---|---|
protected static String |
DEFAULT_MESSAGE_FILE_EXTENSION
The default message file extension. |
protected static String |
MESSAGES_FOLDER
The messages folder. |
protected static String |
NUMBER_SIGN
The number sign character as a string. |
Constructor Summary | |
---|---|
AbstractMessageManager()
|
Method Summary | |
---|---|
void |
addSupportedLanguage(String language)
Adds a new supported language to the manager. |
protected String |
getEntityID(IEntity entity)
Generates the ID of a given entity. |
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. |
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface pt.digitalis.dif.dem.managers.IMessageManager |
---|
collectEntityMessagesFromRepository, collectEntityMessagesFromRepository, collectEntityMessagesFromRepository, collectEntityMessagesFromRepository, isPersistent |
Field Detail |
---|
protected static final String DEFAULT_MESSAGE_FILE_EXTENSION
protected static final String MESSAGES_FOLDER
protected static final String NUMBER_SIGN
Constructor Detail |
---|
public AbstractMessageManager()
Method Detail |
---|
public void addSupportedLanguage(String language)
IMessageManager
addSupportedLanguage
in interface IMessageManager
language
- the new supported language to addIMessageManager.addSupportedLanguage(java.lang.String)
protected String getEntityID(IEntity entity)
entity
- the entity to generate the ID
public MessageList getMessageList(Entity type, IEntity entity)
getMessageList
in interface IMessageManager
type
- the entity typeentity
- the entity object
public MessageList getMessageList(IApplication application)
IMessageManager
getMessageList
in interface IMessageManager
application
- the application for which the messages should be retrieved
IMessageManager.getMessageList(pt.digitalis.dif.dem.interfaces.IApplication)
public MessageList getMessageList(IProvider provider)
IMessageManager
getMessageList
in interface IMessageManager
provider
- the provider for which the messages should be retrieved
IMessageManager.getMessageList(pt.digitalis.dif.dem.interfaces.IProvider)
public MessageList getMessageList(IService service)
IMessageManager
getMessageList
in interface IMessageManager
service
- the service for which the messages should be retrieved
IMessageManager.getMessageList(pt.digitalis.dif.dem.interfaces.IService)
public MessageList getMessageList(IStage stage)
IMessageManager
getMessageList
in interface IMessageManager
stage
- the stage for which the messages should be retrieved
IMessageManager.getMessageList(pt.digitalis.dif.dem.interfaces.IStage)
public Map<String,String> getMessages(IApplication application, String language)
IMessageManager
getMessages
in interface IMessageManager
application
- the application for which the messages should be retrievedlanguage
- the language to filter
IMessageManager.getMessages(pt.digitalis.dif.dem.interfaces.IApplication,
String)
public Map<String,String> getMessages(IProvider provider, String language)
IMessageManager
getMessages
in interface IMessageManager
provider
- the provider for which the messages should be retrievedlanguage
- the language to search
IMessageManager.getMessages(pt.digitalis.dif.dem.interfaces.IProvider, String)
public Map<String,String> getMessages(IService service, String language)
IMessageManager
getMessages
in interface IMessageManager
service
- the service for which the messages should be retrievedlanguage
- the language to filter
IMessageManager.getMessages(pt.digitalis.dif.dem.interfaces.IService, String)
public Map<String,String> getMessages(IStage stage, String language)
IMessageManager
getMessages
in interface IMessageManager
stage
- the stage for which the messages should be retrievedlanguage
- the language to filter
IMessageManager.getMessages(pt.digitalis.dif.dem.interfaces.IStage, String)
public Set<String> getSupportedLanguages()
IMessageManager
getSupportedLanguages
in interface IMessageManager
IMessageManager.getSupportedLanguages()
public void invalidateMessages()
IMessageManager
invalidateMessages
in interface IMessageManager
IMessageManager.invalidateMessages()
public boolean isLanguageSupported(String language)
IMessageManager
isLanguageSupported
in interface IMessageManager
language
- the language to check
IMessageManager.isLanguageSupported(java.lang.String)
public void updateMessage(Class<?> clazz, String messageID, MessageTranslations message)
IMessageManager
updateMessage
in interface IMessageManager
clazz
- the classmessageID
- the ID of the message to updatemessage
- the message (and it's translations) to updateIMessageManager.updateMessage(java.lang.Class, java.lang.String,
pt.digitalis.dif.dem.objects.messages.MessageTranslations)
public void updateMessage(IEntity entity, String messageID, MessageTranslations message)
IMessageManager
updateMessage
in interface IMessageManager
entity
- the entitymessageID
- the ID of the message to updatemessage
- the message (and it's translations) to updateIMessageManager.updateMessage(pt.digitalis.dif.dem.interfaces.IEntity,
java.lang.String, pt.digitalis.dif.dem.objects.messages.MessageTranslations)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |