org.benow.web.dev
Class WebDevServiceImpl

java.lang.Object
  extended by org.benow.web.dev.WebDevServiceImpl
All Implemented Interfaces:
org.benow.java.spec.Markup, org.benow.service.Service, WebDevelopmentService

public class WebDevServiceImpl
extends java.lang.Object
implements WebDevelopmentService


Nested Class Summary
static class WebDevServiceImpl.GenerationXML
           
 
Nested classes/interfaces inherited from interface org.benow.java.spec.Markup
org.benow.java.spec.Markup.ParamName, org.benow.java.spec.Markup.ReturnDescription
 
Field Summary
static java.lang.String SESS_GEN_XML
           
 
Fields inherited from interface org.benow.web.dev.WebDevelopmentService
PERM_INVOKE
 
Constructor Summary
WebDevServiceImpl()
           
 
Method Summary
 void createItem(java.lang.String type, java.lang.String item)
           
 void createTemplate(java.lang.String page, java.lang.String template)
           
 void createTemplateWithRepoFetch(java.lang.String page, java.lang.String template, java.lang.Class<?> classToFetch, java.lang.String keyParam, java.lang.String destTemplate)
           
 void createTemplateWithServiceCall(java.lang.String page, java.lang.String template, java.lang.Class<? extends org.benow.service.Service> serviceClass, java.lang.String sig, java.lang.String destTemplate)
          Creates a new template containing a service call.
 java.lang.String generate(GenerationParams gen)
           
 java.lang.String getItem(java.lang.String type, java.lang.String item, boolean confirmExtract, boolean confirmExternal)
          Gets a named item of a given type.
 java.util.List<XMLChunk> getLastXML()
           
 java.util.List<java.lang.String> getMaintainableItems(java.lang.String type, boolean includeResources)
           
 java.util.List<org.benow.repository.jdbc.ClassSchemaInfo> getRepoClasses()
          Get info for all classes stored in repository
 java.util.List<org.benow.java.packager.resource.ResourceEntry> getResources()
           
 org.benow.java.spec.ServiceSpecification getService(java.lang.String name)
           
 StylesheetInfo getXSLInfo(java.lang.String path)
           
 void updateItem(java.lang.String type, java.lang.String item, java.lang.String body)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SESS_GEN_XML

public static final java.lang.String SESS_GEN_XML
See Also:
Constant Field Values
Constructor Detail

WebDevServiceImpl

public WebDevServiceImpl()
Method Detail

getService

public org.benow.java.spec.ServiceSpecification getService(java.lang.String name)
                                                    throws org.benow.java.spec.SpecificationException,
                                                           java.lang.ClassNotFoundException
Specified by:
getService in interface WebDevelopmentService
Throws:
org.benow.java.spec.SpecificationException
java.lang.ClassNotFoundException

getLastXML

public java.util.List<XMLChunk> getLastXML()
Specified by:
getLastXML in interface WebDevelopmentService

getMaintainableItems

public java.util.List<java.lang.String> getMaintainableItems(java.lang.String type,
                                                             boolean includeResources)
                                                      throws org.benow.repository.NoSuchObjectException
Specified by:
getMaintainableItems in interface WebDevelopmentService
Throws:
org.benow.repository.NoSuchObjectException

getItem

public java.lang.String getItem(java.lang.String type,
                                java.lang.String item,
                                boolean confirmExtract,
                                boolean confirmExternal)
                         throws java.io.IOException,
                                org.benow.repository.NoSuchObjectException,
                                BundledInResourceException,
                                IsExternalFileException
Description copied from interface: WebDevelopmentService
Gets a named item of a given type. Items in resources (ie jars) can be extracted by passing true for confirmExtract. If false is passed, resources which do not exist as local files cause a BundledInResourceException (as they may not be taken).

Specified by:
getItem in interface WebDevelopmentService
Parameters:
type - type of item to get
item - name of item
confirmExtract - true to extract from resource, or false to throw BundledInResourceException and not extract
Returns:
Throws:
java.io.IOException
org.benow.repository.NoSuchObjectException
BundledInResourceException - when the item is found to be in a resource bundle (jar)
IsExternalFileException - when the item is found to not exist within the current directory, but is a file elsewhere

updateItem

public void updateItem(java.lang.String type,
                       java.lang.String item,
                       java.lang.String body)
                throws java.io.IOException,
                       org.benow.repository.NoSuchObjectException,
                       RedirectException,
                       javax.xml.transform.TransformerException
Specified by:
updateItem in interface WebDevelopmentService
Throws:
java.io.IOException
org.benow.repository.NoSuchObjectException
RedirectException
javax.xml.transform.TransformerException

createItem

public void createItem(java.lang.String type,
                       java.lang.String item)
                throws java.io.FileNotFoundException,
                       java.io.IOException,
                       org.benow.repository.NoSuchObjectException
Specified by:
createItem in interface WebDevelopmentService
Throws:
java.io.FileNotFoundException
java.io.IOException
org.benow.repository.NoSuchObjectException

createTemplateWithServiceCall

public void createTemplateWithServiceCall(java.lang.String page,
                                          java.lang.String template,
                                          java.lang.Class<? extends org.benow.service.Service> serviceClass,
                                          java.lang.String sig,
                                          java.lang.String destTemplate)
                                   throws TerseWebException,
                                          java.lang.Exception
Description copied from interface: WebDevelopmentService
Creates a new template containing a service call.

Specified by:
createTemplateWithServiceCall in interface WebDevelopmentService
Throws:
TerseWebException
javax.xml.transform.TransformerException
java.io.FileNotFoundException
java.lang.Exception

generate

public java.lang.String generate(GenerationParams gen)
                          throws javax.xml.transform.TransformerException,
                                 WebException,
                                 org.benow.java.spec.SpecificationException,
                                 java.io.FileNotFoundException
Throws:
javax.xml.transform.TransformerException
WebException
org.benow.java.spec.SpecificationException
java.io.FileNotFoundException

createTemplate

public void createTemplate(java.lang.String page,
                           java.lang.String template)
                    throws java.io.IOException,
                           javax.xml.transform.TransformerException,
                           javax.xml.parsers.ParserConfigurationException,
                           org.xml.sax.SAXException,
                           RedirectException
Specified by:
createTemplate in interface WebDevelopmentService
Throws:
java.io.IOException
javax.xml.transform.TransformerException
javax.xml.parsers.ParserConfigurationException
org.xml.sax.SAXException
RedirectException

getRepoClasses

public java.util.List<org.benow.repository.jdbc.ClassSchemaInfo> getRepoClasses()
Description copied from interface: WebDevelopmentService
Get info for all classes stored in repository

Specified by:
getRepoClasses in interface WebDevelopmentService
Returns:

createTemplateWithRepoFetch

public void createTemplateWithRepoFetch(java.lang.String page,
                                        java.lang.String template,
                                        java.lang.Class<?> classToFetch,
                                        java.lang.String keyParam,
                                        java.lang.String destTemplate)
                                 throws javax.xml.parsers.ParserConfigurationException,
                                        org.xml.sax.SAXException,
                                        java.io.IOException,
                                        javax.xml.transform.TransformerException,
                                        org.benow.java.spec.SpecificationException,
                                        WebException
Specified by:
createTemplateWithRepoFetch in interface WebDevelopmentService
Throws:
javax.xml.parsers.ParserConfigurationException
org.xml.sax.SAXException
java.io.IOException
javax.xml.transform.TransformerException
org.benow.java.spec.SpecificationException
WebException

getResources

public java.util.List<org.benow.java.packager.resource.ResourceEntry> getResources()
                                                                            throws java.io.IOException
Specified by:
getResources in interface WebDevelopmentService
Throws:
java.io.IOException

getXSLInfo

public StylesheetInfo getXSLInfo(java.lang.String path)
                          throws java.io.IOException,
                                 java.lang.Exception
Specified by:
getXSLInfo in interface WebDevelopmentService
Throws:
java.io.IOException
java.lang.Exception