Files
alfresco-community-repo/source/java/org/alfresco/web/forms/RenderingEngine.java
Ariel Backenroth cb80c75014 first pass at add content from xforms ui
- added an add content panel to the file picker which enables browsing the local disk to select content to upload.  the file is uploaded without requiring a browser refresh by targeting a hidden iframe.  the server response includes a js call which notifies the form that the upload is complete.
- added annotations to ajax methods to enable specifying the response mime type of the method.  needed for uploadFile which returns html rather than xml
- minor cleanup in schemaformbuilder
- added mapping between xsl-fo mimetypes and those in mimetype map


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@4576 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
2006-12-12 03:13:23 +00:00

90 lines
2.5 KiB
Java

/*
* Copyright (C) 2005 Alfresco, Inc.
*
* Licensed under the Mozilla Public License version 1.1
* with a permitted attribution clause. You may obtain a
* copy of the License at
*
* http://www.alfresco.org/legal/license.txt
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
* either express or implied. See the License for the specific
* language governing permissions and limitations under the
* License.
*/
package org.alfresco.web.forms;
import org.alfresco.service.cmr.repository.NodeRef;
import java.io.IOException;
import java.io.OutputStream;
import java.io.Serializable;
import java.util.Map;
import org.w3c.dom.Document;
/**
* Serializes the xml instance data collected by a form to a writer.
*
* @author Ariel Backenroth
*/
public interface RenderingEngine
extends Serializable
{
/////////////////////////////////////////////////////////////////////////////
public static class RenderingException
extends Exception
{
public RenderingException(final String msg)
{
super(msg);
}
public RenderingException(final Exception cause)
{
super(cause);
}
public RenderingException(final String msg, final Exception cause)
{
super(msg, cause);
}
}
/////////////////////////////////////////////////////////////////////////////
/**
* Returns the rendering engines name.
*
* @return the name of the rendering engine.
*/
public String getName();
/**
* Returns the default file extension for rendering engine templates for this
* rendering engine.
*
* @return the default file extension for rendering engine templates for this
* rendering engine.
*/
public String getDefaultTemplateFileExtension();
/**
* Renders the xml data in to a presentation format.
*
* @param formInstanceData the xml content to serialize.
* @param ret the rendering engine template
* @param form the form that collected the xml content.
* @param parameters the set of parameters to the rendering engine
* @param out the output stream to serialize to.
*/
public void render(final Document formInstanceData,
final RenderingEngineTemplate ret,
final Map<String, String> parameters,
final OutputStream out)
throws IOException, RenderingException;
}