info.magnolia.ui.api.action
Class ActionDefinitionKeyGenerator

java.lang.Object
  extended by info.magnolia.i18nsystem.AbstractI18nKeyGenerator<ActionDefinition>
      extended by info.magnolia.ui.api.action.ActionDefinitionKeyGenerator
All Implemented Interfaces:
info.magnolia.i18nsystem.I18nKeyGenerator<ActionDefinition>

public class ActionDefinitionKeyGenerator
extends info.magnolia.i18nsystem.AbstractI18nKeyGenerator<ActionDefinition>

An I18n key generator for the actionbar actions (labels, descriptions, errors, etc.).


Constructor Summary
ActionDefinitionKeyGenerator()
           
 
Method Summary
protected  void keysFor(List<String> keys, ActionDefinition actionDefinition, AnnotatedElement el)
          Will generate keys for the message bundle in the following form <app-name>.<sub-app-name>.actions.<action-name>[.name of getter or field annotated with I18nText].
 
Methods inherited from class info.magnolia.i18nsystem.AbstractI18nKeyGenerator
addKey, fieldOrGetterName, getAncestorKeyGenerators, getAncestors, getIdOrNameForUnknownRoot, getKeyGenerator, getParentViaCast, getRoot, getRootKeyGenerator, keyify, keysFor, messageBundleNameFor, resolveMessageBundleNameUpwards
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ActionDefinitionKeyGenerator

public ActionDefinitionKeyGenerator()
Method Detail

keysFor

protected void keysFor(List<String> keys,
                       ActionDefinition actionDefinition,
                       AnnotatedElement el)
Will generate keys for the message bundle in the following form <app-name>.<sub-app-name>.actions.<action-name>[.name of getter or field annotated with I18nText].

Also generates "default" keys for all actions. Still unique keys for those actions are generated in case one wants to override the default ones. For example, if your app has a commit action defined like this /modules/my-module/apps/my-app/subApps/detail/actions/commit a fallback key will in the form actions.commit will be generated besides a my-module.detail.actions.commit key.

Specified by:
keysFor in class info.magnolia.i18nsystem.AbstractI18nKeyGenerator<ActionDefinition>


Copyright © 2013 Magnolia International Ltd.. All Rights Reserved.