org.apache.pluto.portlet.admin.services
Class DeployWarService

java.lang.Object
  extended byorg.apache.pluto.portlet.admin.BaseAdminObject
      extended byorg.apache.pluto.portlet.admin.services.DeployWarService

public class DeployWarService
extends BaseAdminObject

This is the service that does is called by DeployWarPortlet to do the work of deploying a portlet war.

Author:
Ken Atherton, Craig Doremus

Field Summary
static java.lang.String CLASS_NAME
           
static java.lang.String ERROR_NO_FILE
           
 
Constructor Summary
DeployWarService()
          Default constructor
DeployWarService(java.lang.String logId)
          Constructor taking a String used to identify a logging record.
 
Method Summary
 void addToPageReg(PageTO page)
          Add a new page record to the pageregistry.xml file.
 boolean addToPortletContexts(java.lang.String context)
           
static java.lang.String mapToEntrySetString(java.util.Map inputMap)
           
 boolean pageExists(java.lang.String pageName)
           
 java.lang.String processFileUpload(javax.portlet.ActionRequest request, javax.portlet.ActionResponse response)
          Does the work of this service to deploy a portlet war file.
 java.lang.String readFileToString(java.io.File file)
          Puts the contents of a file into a String.
 void savePageLayout(javax.portlet.ActionRequest req)
           
 void setPage(javax.portlet.ActionRequest req)
          Sets the page information into a PageTO object that is loaded into the session.
 void writeStringToFile(java.io.File file, java.lang.String contents)
          Writes the contents of a file into a String.
 
Methods inherited from class org.apache.pluto.portlet.admin.BaseAdminObject
logDebug, logError, logError, logMethodEnd, logMethodEnd, logMethodStart, logParam, logParam, logParam, logVar, logVar, logVar, logWarn
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ERROR_NO_FILE

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

CLASS_NAME

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

DeployWarService

public DeployWarService()
Default constructor


DeployWarService

public DeployWarService(java.lang.String logId)
Constructor taking a String used to identify a logging record.

Parameters:
logId -
Method Detail

processFileUpload

public java.lang.String processFileUpload(javax.portlet.ActionRequest request,
                                          javax.portlet.ActionResponse response)
Does the work of this service to deploy a portlet war file.

Parameters:
request - DeployWarService request object.
response - DeployWarService response object.

mapToEntrySetString

public static java.lang.String mapToEntrySetString(java.util.Map inputMap)

setPage

public void setPage(javax.portlet.ActionRequest req)
Sets the page information into a PageTO object that is loaded into the session.

Parameters:
req -

savePageLayout

public void savePageLayout(javax.portlet.ActionRequest req)

addToPageReg

public void addToPageReg(PageTO page)
Add a new page record to the pageregistry.xml file.

Parameters:
page - The new page to add

addToPortletContexts

public boolean addToPortletContexts(java.lang.String context)

pageExists

public boolean pageExists(java.lang.String pageName)

readFileToString

public java.lang.String readFileToString(java.io.File file)
Puts the contents of a file into a String. This only works with text files.

Parameters:
file - The File to read
Returns:
A String containing the contents of the file.

writeStringToFile

public void writeStringToFile(java.io.File file,
                              java.lang.String contents)
Writes the contents of a file into a String.

Parameters:
file - Te File to write.
contents - The String to add to the file.


Copyright © 2003-2007 . All Rights Reserved.