1 31 32 package org.opencms.xml.content; 33 34 import org.opencms.file.CmsFile; 35 import org.opencms.file.CmsObject; 36 import org.opencms.file.CmsProperty; 37 import org.opencms.i18n.CmsMessages; 38 import org.opencms.main.CmsException; 39 import org.opencms.widgets.I_CmsWidget; 40 import org.opencms.xml.CmsXmlContentDefinition; 41 import org.opencms.xml.CmsXmlException; 42 import org.opencms.xml.types.I_CmsXmlContentValue; 43 import org.opencms.xml.types.I_CmsXmlSchemaType; 44 45 import java.util.Arrays ; 46 import java.util.Collections ; 47 import java.util.List ; 48 import java.util.Locale ; 49 50 import org.dom4j.Element; 51 52 61 public interface I_CmsXmlContentHandler { 62 63 64 String [] ATTRIBUTE_ARRAY = {"datereleased", "dateexpired"}; 65 66 67 List ATTRIBUTES = Collections.unmodifiableList(Arrays.asList(ATTRIBUTE_ARRAY)); 68 69 70 String MAPTO_ATTRIBUTE = "attribute:"; 71 72 73 String MAPTO_PROPERTY = "property:"; 74 75 76 String MAPTO_PROPERTY_INDIVIDUAL = MAPTO_PROPERTY + CmsProperty.TYPE_INDIVIDUAL + ":"; 77 78 79 String MAPTO_PROPERTY_LIST = "propertyList:"; 80 81 82 String MAPTO_PROPERTY_LIST_INDIVIDUAL = MAPTO_PROPERTY_LIST + CmsProperty.TYPE_INDIVIDUAL + ":"; 83 84 85 String MAPTO_PROPERTY_LIST_SHARED = MAPTO_PROPERTY_LIST + CmsProperty.TYPE_SHARED + ":"; 86 87 88 String MAPTO_PROPERTY_SHARED = MAPTO_PROPERTY + CmsProperty.TYPE_SHARED + ":"; 89 90 99 String getConfiguration(I_CmsXmlSchemaType type); 100 101 114 String getDefault(CmsObject cms, I_CmsXmlContentValue value, Locale locale); 115 116 128 CmsMessages getMessages(Locale locale); 129 130 141 String getPreview(CmsObject cms, CmsXmlContent content, String resourcename); 142 143 155 I_CmsWidget getWidget(I_CmsXmlContentValue value) throws CmsXmlException; 156 157 166 void initialize(Element appInfoElement, CmsXmlContentDefinition contentDefinition) throws CmsXmlException; 167 168 183 CmsFile prepareForWrite(CmsObject cms, CmsXmlContent content, CmsFile file) throws CmsException; 184 185 195 void resolveMapping(CmsObject cms, CmsXmlContent content, I_CmsXmlContentValue value) throws CmsException; 196 197 210 CmsXmlContentErrorHandler resolveValidation( 211 CmsObject cms, 212 I_CmsXmlContentValue value, 213 CmsXmlContentErrorHandler errorHandler); 214 } | Popular Tags |