/** * Create a new instance of an XML content based on the given content definiton, * that will have one language node for the given locale all initialized with default values.<p> * * The given encoding is used when marshalling the XML again later.<p> * * @param cms the current users OpenCms content * @param locale the locale to generate the default content for * @param encoding the encoding to use when marshalling the XML content later * @param contentDefinition the content definiton to create the content for * * @return the created XML content */ public static CmsXmlContent createDocument( CmsObject cms, Locale locale, String encoding, CmsXmlContentDefinition contentDefinition) { // create the XML content CmsXmlContent content = new CmsXmlContent(cms, locale, encoding, contentDefinition); // call prepare for use content handler and return the result return content.getHandler().prepareForUse(cms, content); }
/** * Create a new instance of an container page based on the given default content, * that will have all language nodes of the default content and ensures the presence of the given locale.<p> * * The given encoding is used when marshalling the XML again later.<p> * * @param cms the current users OpenCms content * @param locale the locale to generate the default content for * @param modelUri the absolute path to the container page file acting as model * * @throws CmsException in case the model file is not found or not valid * * @return the created container page */ public static CmsXmlContainerPage createDocument(CmsObject cms, Locale locale, String modelUri) throws CmsException { // create the XML content CmsXmlContainerPage content = new CmsXmlContainerPage(cms, locale, modelUri); // call prepare for use content handler and return the result return (CmsXmlContainerPage)content.getHandler().prepareForUse(cms, content); }
/** * Create a new instance of an group container based on the given default content, * that will have all language nodes of the default content and ensures the presence of the given locale.<p> * * The given encoding is used when marshalling the XML again later.<p> * * @param cms the current users OpenCms content * @param locale the locale to generate the default content for * @param modelUri the absolute path to the group container file acting as model * * @throws CmsException in case the model file is not found or not valid * * @return the created group container */ public static CmsXmlGroupContainer createDocument(CmsObject cms, Locale locale, String modelUri) throws CmsException { // create the XML content CmsXmlGroupContainer content = new CmsXmlGroupContainer(cms, locale, modelUri); // call prepare for use content handler and return the result return (CmsXmlGroupContainer)content.getHandler().prepareForUse(cms, content); }
/** * Factory method to unmarshal (generate) a XML content instance from a XML document.<p> * * The given encoding is used when marshalling the XML again later.<p> * * <b>Warning:</b><br/> * This method does not support requested historic versions, it always loads the * most recent version. Use <code>{@link #unmarshal(CmsObject, CmsResource, ServletRequest)}</code> * for history support.<p> * * @param cms the cms context, if <code>null</code> no link validation is performed * @param document the XML document to generate the XML content from * @param encoding the encoding to use when marshalling the XML content later * @param resolver the XML entitiy resolver to use * * @return a XML content instance unmarshalled from the String */ public static CmsXmlContent unmarshal(CmsObject cms, Document document, String encoding, EntityResolver resolver) { CmsXmlContent content = new CmsXmlContent(cms, document, encoding, resolver); // call prepare for use content handler and return the result return content.getHandler().prepareForUse(cms, content); }
/** * Create a new instance of a group container based on the given content definition, * that will have one language node for the given locale all initialized with default values.<p> * * The given encoding is used when marshalling the XML again later.<p> * * @param cms the current users OpenCms content * @param locale the locale to generate the default content for * @param encoding the encoding to use when marshalling the XML content later * @param contentDefinition the content definition to create the content for * * @return the created group container */ public static CmsXmlGroupContainer createDocument( CmsObject cms, Locale locale, String encoding, CmsXmlContentDefinition contentDefinition) { // create the XML content CmsXmlGroupContainer content = new CmsXmlGroupContainer(cms, locale, encoding, contentDefinition); // call prepare for use content handler and return the result return (CmsXmlGroupContainer)content.getHandler().prepareForUse(cms, content); }
/** * Create a new instance of a container page based on the given content definition, * that will have one language node for the given locale all initialized with default values.<p> * * The given encoding is used when marshalling the XML again later.<p> * * @param cms the current users OpenCms content * @param locale the locale to generate the default content for * @param encoding the encoding to use when marshalling the XML content later * @param contentDefinition the content definition to create the content for * * @return the created container page */ public static CmsXmlContainerPage createDocument( CmsObject cms, Locale locale, String encoding, CmsXmlContentDefinition contentDefinition) { // create the XML content CmsXmlContainerPage content = new CmsXmlContainerPage(cms, locale, encoding, contentDefinition); // call prepare for use content handler and return the result return (CmsXmlContainerPage)content.getHandler().prepareForUse(cms, content); }
/** * Factory method to unmarshal (generate) a group container instance from a XML document.<p> * * The given encoding is used when marshalling the XML again later.<p> * * <b>Warning:</b><br/> * This method does not support requested historic versions, it always loads the * most recent version. Use <code>{@link #unmarshal(CmsObject, CmsResource, ServletRequest)}</code> * for history support.<p> * * @param cms the cms context, if <code>null</code> no link validation is performed * @param document the XML document to generate the group container from * @param encoding the encoding to use when marshalling the group container later * @param resolver the XML entity resolver to use * * @return a group container instance unmarshalled from the String */ public static CmsXmlGroupContainer unmarshal( CmsObject cms, Document document, String encoding, EntityResolver resolver) { CmsXmlGroupContainer content = new CmsXmlGroupContainer(cms, document, encoding, resolver); // call prepare for use content handler and return the result return (CmsXmlGroupContainer)content.getHandler().prepareForUse(cms, content); }
/** * Factory method to unmarshal (generate) a container page instance from a XML document.<p> * * The given encoding is used when marshalling the XML again later.<p> * * <b>Warning:</b><br/> * This method does not support requested historic versions, it always loads the * most recent version. Use <code>{@link #unmarshal(CmsObject, CmsResource, ServletRequest)}</code> * for history support.<p> * * @param cms the cms context, if <code>null</code> no link validation is performed * @param document the XML document to generate the container page from * @param encoding the encoding to use when marshalling the container page later * @param resolver the XML entity resolver to use * * @return a container page instance unmarshalled from the String */ public static CmsXmlContainerPage unmarshal( CmsObject cms, Document document, String encoding, EntityResolver resolver) { CmsXmlContainerPage content = new CmsXmlContainerPage(cms, document, encoding, resolver); // call prepare for use content handler and return the result return (CmsXmlContainerPage)content.getHandler().prepareForUse(cms, content); }
/** * Create a new instance of an XML content based on the given default content, * hat will have all language nodes of the default content and ensures the presence of the given locale.<p> * * The given encoding is used when marshalling the XML again later.<p> * * @param cms the current users OpenCms content * @param locale the locale to generate the default content for * @param modelUri the absolute path to the XML content file acting as model * * @throws CmsException in case the model file is not found or not valid * * @return the created XML content */ public static CmsXmlContent createDocument(CmsObject cms, Locale locale, String modelUri) throws CmsException { // create the XML content CmsXmlContent content = new CmsXmlContent(cms, locale, modelUri); // call prepare for use content handler and return the result return content.getContentDefinition().getContentHandler().prepareForUse(cms, content); }
/** * Create a new instance of an XML content based on the given default content, * hat will have all language nodes of the default content and ensures the presence of the given locale.<p> * * The given encoding is used when marshalling the XML again later.<p> * * @param cms the current users OpenCms content * @param locale the locale to generate the default content for * @param modelUri the absolute path to the XML content file acting as model * * @throws CmsException in case the model file is not found or not valid * * @return the created XML content */ public static CmsXmlContent createDocument(CmsObject cms, Locale locale, String modelUri) throws CmsException { // create the XML content CmsXmlContent content = new CmsXmlContent(cms, locale, modelUri); // call prepare for use content handler and return the result return content.getContentDefinition().getContentHandler().prepareForUse(cms, content); }
/** * Factory method to unmarshal (generate) a XML content instance from a XML document.<p> * * The given encoding is used when marshalling the XML again later.<p> * * <b>Warning:</b><br/> * This method does not support requested historic versions, it always loads the * most recent version. Use <code>{@link #unmarshal(CmsObject, CmsResource, ServletRequest)}</code> * for history support.<p> * * @param cms the cms context, if <code>null</code> no link validation is performed * @param document the XML document to generate the XML content from * @param encoding the encoding to use when marshalling the XML content later * @param resolver the XML entitiy resolver to use * * @return a XML content instance unmarshalled from the String */ public static CmsXmlContent unmarshal(CmsObject cms, Document document, String encoding, EntityResolver resolver) { CmsXmlContent content = new CmsXmlContent(cms, document, encoding, resolver); // call prepare for use content handler and return the result return content.getContentDefinition().getContentHandler().prepareForUse(cms, content); }
/** * Create a new instance of an XML content based on the given content definiton, * that will have one language node for the given locale all initialized with default values.<p> * * The given encoding is used when marshalling the XML again later.<p> * * @param cms the current users OpenCms content * @param locale the locale to generate the default content for * @param encoding the encoding to use when marshalling the XML content later * @param contentDefinition the content definiton to create the content for * * @return the created XML content */ public static CmsXmlContent createDocument( CmsObject cms, Locale locale, String encoding, CmsXmlContentDefinition contentDefinition) { // create the XML content CmsXmlContent content = new CmsXmlContent(cms, locale, encoding, contentDefinition); // call prepare for use content handler and return the result return content.getContentDefinition().getContentHandler().prepareForUse(cms, content); }
return content.getHandler().prepareForUse(cms, content);
return content.getContentDefinition().getContentHandler().prepareForUse(cms, content);
CmsXmlGroupContainer xmlGroupContainer = (CmsXmlGroupContainer)content.getHandler().prepareForUse(cms, content);
CmsXmlContainerPage xmlCntPage = (CmsXmlContainerPage)content.getHandler().prepareForUse(cms, content);