info.magnolia.dam.app.assets.field.translator
Class AssetCompositeIdKeyTranslator

java.lang.Object
  extended by info.magnolia.dam.app.assets.field.translator.AssetCompositeIdKeyTranslator
All Implemented Interfaces:
com.vaadin.data.util.converter.Converter<String,String>, info.magnolia.ui.form.field.converter.IdentifierToPathConverter, Serializable

public class AssetCompositeIdKeyTranslator
extends Object
implements info.magnolia.ui.form.field.converter.IdentifierToPathConverter

PropertyTranslator used to convert a Asset CompositeIdKey to a Path and Path to CompositeIdKey. Composite key are generated with the following class DamIdParser. In general, if the translation is not possible, return null.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from interface com.vaadin.data.util.converter.Converter
com.vaadin.data.util.converter.Converter.ConversionException
 
Constructor Summary
AssetCompositeIdKeyTranslator()
           
 
Method Summary
 String convertToModel(String path, Class<? extends String> targetType, Locale locale)
           
 String convertToPresentation(String compositeId, Class<? extends String> targetType, Locale locale)
           
 Class<String> getModelType()
           
 Class<String> getPresentationType()
           
 void setWorkspaceName(String workspaceName)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AssetCompositeIdKeyTranslator

public AssetCompositeIdKeyTranslator()
Method Detail

convertToModel

public String convertToModel(String path,
                             Class<? extends String> targetType,
                             Locale locale)
                      throws com.vaadin.data.util.converter.Converter.ConversionException
Specified by:
convertToModel in interface com.vaadin.data.util.converter.Converter<String,String>
Throws:
com.vaadin.data.util.converter.Converter.ConversionException

convertToPresentation

public String convertToPresentation(String compositeId,
                                    Class<? extends String> targetType,
                                    Locale locale)
                             throws com.vaadin.data.util.converter.Converter.ConversionException
Specified by:
convertToPresentation in interface com.vaadin.data.util.converter.Converter<String,String>
Throws:
com.vaadin.data.util.converter.Converter.ConversionException

getModelType

public Class<String> getModelType()
Specified by:
getModelType in interface com.vaadin.data.util.converter.Converter<String,String>

getPresentationType

public Class<String> getPresentationType()
Specified by:
getPresentationType in interface com.vaadin.data.util.converter.Converter<String,String>

setWorkspaceName

public void setWorkspaceName(String workspaceName)
Specified by:
setWorkspaceName in interface info.magnolia.ui.form.field.converter.IdentifierToPathConverter


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