|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.pluto.portlet.admin.BaseAdminObject
org.apache.pluto.portlet.admin.services.DeployWarService
public class DeployWarService
This is the service that does is called by DeployWarPortlet to do the work of deploying a portlet war.
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 | |
---|---|
(package private) java.lang.String |
addRecordsToWebXml(java.lang.String context,
java.lang.String contents,
java.lang.String[] elements,
java.util.List portletData)
Adds ServletPortlet servlet or servlet-mapping records to web.xml for new portlet deployment. |
void |
addToPageReg(PageTO page)
Add a new page record to the pageregistry.xml file. |
boolean |
addToPortletContexts(java.lang.String context)
|
private static java.lang.String[] |
arrayListToStringArray(java.util.ArrayList argStringArrayList)
|
private java.util.ArrayList |
createDeploymentArgs(java.lang.String serverFileName,
java.lang.String tempDir,
ActionRequest request,
boolean appExists,
java.lang.String context)
Creates arguments (parameters) for Deploy class that does the deployment. |
private java.io.InputStream |
extractFile(java.lang.String zipfilename,
java.lang.String filename)
|
private java.lang.String |
getRootFilename(char delimiter,
java.lang.String pathName)
|
private java.lang.String |
getSecurityRoleRefRecord(java.lang.String context,
PortletDD portletData)
Gets the web.xml security-role-ref record for PortletServlet from portlet.xml data |
private java.lang.String |
getServletMappingRecord(PortletDD portletData)
Gets the web.xml servlet-mapping record for PortletServlet from portlet.xml data |
private java.lang.String |
getServletRecord(java.lang.String context,
PortletDD portletData)
Gets the web.xml servlet record for PortletServlet from portlet.xml data |
static java.lang.String |
mapToEntrySetString(java.util.Map inputMap)
|
boolean |
pageExists(java.lang.String pageName)
|
java.lang.String |
processFileUpload(ActionRequest request,
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(ActionRequest req)
|
void |
setPage(ActionRequest req)
Sets the page information into a PageTO object that is loaded into the session. |
(package private) void |
updateWebXml(java.lang.String context)
Updates web.xml with servlet and servlet-mapping records related to PortletServlet. |
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 |
---|
public static final java.lang.String ERROR_NO_FILE
public static final java.lang.String CLASS_NAME
Constructor Detail |
---|
public DeployWarService()
public DeployWarService(java.lang.String logId)
logId
- Method Detail |
---|
public java.lang.String processFileUpload(ActionRequest request, ActionResponse response)
request
- DeployWarService request object.response
- DeployWarService response object.private java.lang.String getRootFilename(char delimiter, java.lang.String pathName)
private static java.lang.String[] arrayListToStringArray(java.util.ArrayList argStringArrayList)
private java.io.InputStream extractFile(java.lang.String zipfilename, java.lang.String filename)
private java.util.ArrayList createDeploymentArgs(java.lang.String serverFileName, java.lang.String tempDir, ActionRequest request, boolean appExists, java.lang.String context) throws java.lang.Exception
serverFileName
- The name of the war file to be deployedtempDir
- Full path to temp dir that holds the war file to be deployedrequest
- ActionRequest of the portlet.appExists
- True if this is a re-deployment, else false
java.lang.Exception
Deploy.main(java.lang.String[])
public static java.lang.String mapToEntrySetString(java.util.Map inputMap)
public void setPage(ActionRequest req)
req
- public void savePageLayout(ActionRequest req)
public void addToPageReg(PageTO page)
page
- The new page to addpublic boolean addToPortletContexts(java.lang.String context)
public boolean pageExists(java.lang.String pageName)
public java.lang.String readFileToString(java.io.File file)
file
- The File to read
public void writeStringToFile(java.io.File file, java.lang.String contents)
file
- Te File to write.contents
- The String to add to the file.void updateWebXml(java.lang.String context)
context
- java.lang.String addRecordsToWebXml(java.lang.String context, java.lang.String contents, java.lang.String[] elements, java.util.List portletData)
context
- Web context or directory under webappscontents
- Current contents of the web.xml fileelements
- Elements in web.xml to search for. If found, new
elements will be inserted to the contents String. NOTE: First element
(elements[0] signals the kind of record to add (servlet or servlet-mapping).portletData
- A List of PortletDD items containing the data of
portlets to be deployed.private java.lang.String getServletRecord(java.lang.String context, PortletDD portletData)
context
- Context nameportletData
- Data from portlet.xml
private java.lang.String getSecurityRoleRefRecord(java.lang.String context, PortletDD portletData)
context
- Context nameportletData
- Data from portlet.xml
private java.lang.String getServletMappingRecord(PortletDD portletData)
context
- Context nameportletData
- Data from portlet.xml
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |