Package org.hippoecm.frontend.i18n.types
Class TypeTranslator
java.lang.Object
org.hippoecm.frontend.model.nodetypes.NodeTypeModelWrapper
org.hippoecm.frontend.i18n.types.TypeTranslator
- All Implemented Interfaces:
Serializable
,org.apache.wicket.model.IDetachable
,org.apache.wicket.model.IModel<NodeType>
,org.apache.wicket.util.io.IClusterable
- See Also:
-
Field Summary
Fields inherited from class org.hippoecm.frontend.model.nodetypes.NodeTypeModelWrapper
itemModel
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
detach()
org.apache.wicket.model.IModel<String>
getPropertyName
(String compoundName) Get the translated name of a compound's or document's property (field), e.g.org.apache.wicket.model.IModel<String>
Get the translated name of the type.Get the value for a certain property in the current locale.org.apache.wicket.model.IModel<String>
getValueName
(String property, org.apache.wicket.model.IModel<String> value) Get the translated name of a specific value of a property, e.g.Methods inherited from class org.hippoecm.frontend.model.nodetypes.NodeTypeModelWrapper
getNodeTypeModel, getObject, setObject
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.apache.wicket.model.IModel
as, combineWith, filter, flatMap, isPresent, map, orElse, orElseGet
-
Constructor Details
-
TypeTranslator
-
-
Method Details
-
getTypeName
Get the translated name of the type. -
getValueName
public org.apache.wicket.model.IModel<String> getValueName(String property, org.apache.wicket.model.IModel<String> value) Get the translated name of a specific value of a property, e.g. "Live" for hippostd:state=published. -
getPropertyName
Get the translated name of a compound's or document's property (field), e.g. "Title" for myproject:title.
There's a fallback to the "caption" as configured on the document type itself. -
getValue
Get the value for a certain property in the current locale. -
detach
public void detach()- Specified by:
detach
in interfaceorg.apache.wicket.model.IDetachable
- Specified by:
detach
in interfaceorg.apache.wicket.model.IModel<NodeType>
- Overrides:
detach
in classNodeTypeModelWrapper
-