CmsXmlContentProperty propDef = propertiesConf.get(propName); if (propDef != null) { isVfs = CmsXmlContentProperty.PropType.isVfsList(propDef.getType());
/** * Checks if the given type is {@link #vfslist}.<p> * * @param type the type to check * * @return <code>true</code> if the given type is {@link #vfslist} */ public static boolean isVfsList(String type) { if (type == null) { return false; } return valueOf(type.toLowerCase()) == vfslist; } }
/** * Returns a converted property value depending on the given type.<p> * * If the type is {@link CmsXmlContentProperty.PropType#vfslist}, the value is parsed as a * list of IDs and converted to a list of paths.<p> * * @param cms the current CMS context * @param type the property type * @param value the raw property value * * @return a converted property value depending on the given type */ public static String getPropValuePaths(CmsObject cms, String type, String value) { if (PropType.isVfsList(type)) { return convertIdsToPaths(cms, value); } return value; }
/** * Returns a converted property value depending on the given type.<p> * * If the type is {@link CmsXmlContentProperty.PropType#vfslist}, the value is parsed as a * list of paths and converted to a list of IDs.<p> * * @param cms the current CMS context * @param type the property type * @param value the raw property value * * @return a converted property value depending on the given type */ public static String getPropValueIds(CmsObject cms, String type, String value) { if (PropType.isVfsList(type)) { return convertPathsToIds(cms, value); } return value; }