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
public class TypeTranslator extends NodeTypeModelWrapper
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class org.hippoecm.frontend.model.nodetypes.NodeTypeModelWrapper
itemModel
-
-
Constructor Summary
Constructors Constructor Description TypeTranslator(JcrNodeTypeModel nodeTypeModel)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
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>
getTypeName()
Get the translated name of the type.String
getValue(String propertyName)
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
-
-
-
-
Constructor Detail
-
TypeTranslator
public TypeTranslator(JcrNodeTypeModel nodeTypeModel)
-
-
Method Detail
-
getTypeName
public org.apache.wicket.model.IModel<String> 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
public org.apache.wicket.model.IModel<String> getPropertyName(String compoundName)
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
public String getValue(String propertyName)
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
-
-