org.alfresco.repo.web.scripts.content
Class MimetypesGet

java.lang.Object
  extended by org.springframework.extensions.webscripts.AbstractWebScript
      extended by org.springframework.extensions.webscripts.DeclarativeWebScript
          extended by org.alfresco.repo.web.scripts.content.MimetypesGet
All Implemented Interfaces:
org.springframework.context.ApplicationContextAware, org.springframework.extensions.webscripts.WebScript

public class MimetypesGet
extends org.springframework.extensions.webscripts.DeclarativeWebScript
implements org.springframework.context.ApplicationContextAware

Lists mimetypes, and optionally their associated content transformers and metadata extractors.

Since:
3.4.b

Nested Class Summary
 
Nested classes/interfaces inherited from class org.springframework.extensions.webscripts.AbstractWebScript
org.springframework.extensions.webscripts.AbstractWebScript.ScriptDetails
 
Field Summary
protected static java.lang.String JOD_WORKER_BEAN
           
static java.lang.String MODEL_EXTENSIONS
           
static java.lang.String MODEL_MIMETYPE_DETAILS
           
static java.lang.String MODEL_MIMETYPES
           
protected static java.lang.String OODIRECT_WORKER_BEAN
           
 
Constructor Summary
MimetypesGet()
           
 
Method Summary
protected  java.util.Map executeImpl(org.springframework.extensions.webscripts.WebScriptRequest req, org.springframework.extensions.webscripts.Status status, org.springframework.extensions.webscripts.Cache cache)
           
protected  java.util.List getExtractors(java.lang.String mimetype)
           
protected  java.lang.String getTransformer(java.lang.String from, java.lang.String to)
          Note - for now, only does the best one, not all
protected  java.util.List getTransformersFrom(java.lang.String mimetype, java.util.List allMimetypes)
           
protected  java.util.List getTransformersTo(java.lang.String mimetype, java.util.List allMimetypes)
           
 void setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
          Uses the context to find OpenOffice related beans.
 void setContentTransformerRegistry(org.alfresco.repo.content.transform.ContentTransformerRegistry contentTransformerRegistry)
          Sets the Content Transformer Registry to be used to decide what transformations exist
 void setMetadataExtracterRegistry(org.alfresco.repo.content.metadata.MetadataExtracterRegistry metadataExtracterRegistry)
          Sets the Metadata Extractor Registry to be used to decide what extractors exist
 void setMimetypeService(org.alfresco.service.cmr.repository.MimetypeService mimetypeService)
          Sets the Mimetype Service to be used to get the list of mime types
 
Methods inherited from class org.springframework.extensions.webscripts.DeclarativeWebScript
execute, executeFinallyImpl, executeImpl, executeImpl, getTemplateModel, renderFormatTemplate
 
Methods inherited from class org.springframework.extensions.webscripts.AbstractWebScript
createArgs, createArgsM, createHeaders, createHeadersM, createScriptParameters, createStatusException, createTemplateParameters, executeScript, getContainer, getDescription, getExecuteScript, getResources, getStatusTemplate, init, renderString, renderString, renderTemplate, sendStatus, setURLModelFactory, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

MODEL_MIMETYPES

public static final java.lang.String MODEL_MIMETYPES
See Also:
Constant Field Values

MODEL_EXTENSIONS

public static final java.lang.String MODEL_EXTENSIONS
See Also:
Constant Field Values

MODEL_MIMETYPE_DETAILS

public static final java.lang.String MODEL_MIMETYPE_DETAILS
See Also:
Constant Field Values

OODIRECT_WORKER_BEAN

protected static final java.lang.String OODIRECT_WORKER_BEAN
See Also:
Constant Field Values

JOD_WORKER_BEAN

protected static final java.lang.String JOD_WORKER_BEAN
See Also:
Constant Field Values
Constructor Detail

MimetypesGet

public MimetypesGet()
Method Detail

setApplicationContext

public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
                           throws org.springframework.beans.BeansException
Uses the context to find OpenOffice related beans. Allows us to work more cleanly on Community and Enterprise

Specified by:
setApplicationContext in interface org.springframework.context.ApplicationContextAware
Throws:
org.springframework.beans.BeansException

setMimetypeService

public void setMimetypeService(org.alfresco.service.cmr.repository.MimetypeService mimetypeService)
Sets the Mimetype Service to be used to get the list of mime types


setContentTransformerRegistry

public void setContentTransformerRegistry(org.alfresco.repo.content.transform.ContentTransformerRegistry contentTransformerRegistry)
Sets the Content Transformer Registry to be used to decide what transformations exist


setMetadataExtracterRegistry

public void setMetadataExtracterRegistry(org.alfresco.repo.content.metadata.MetadataExtracterRegistry metadataExtracterRegistry)
Sets the Metadata Extractor Registry to be used to decide what extractors exist


executeImpl

protected java.util.Map executeImpl(org.springframework.extensions.webscripts.WebScriptRequest req,
                                    org.springframework.extensions.webscripts.Status status,
                                    org.springframework.extensions.webscripts.Cache cache)
Overrides:
executeImpl in class org.springframework.extensions.webscripts.DeclarativeWebScript

getExtractors

protected java.util.List getExtractors(java.lang.String mimetype)

getTransformersFrom

protected java.util.List getTransformersFrom(java.lang.String mimetype,
                                             java.util.List allMimetypes)

getTransformersTo

protected java.util.List getTransformersTo(java.lang.String mimetype,
                                           java.util.List allMimetypes)

getTransformer

protected java.lang.String getTransformer(java.lang.String from,
                                          java.lang.String to)
Note - for now, only does the best one, not all



Copyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.