|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectPageBoxLib.TokenImpl
PageBoxLib.DeployImpl
Deployment Web Service.
Changes:
alexis.grandemange@pagebox.net
Copyright (c) 2002-2004 Alexis Grandemange
This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; version 2.1 of the License. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public License lesser.txt should be included in the distribution.
Nested Class Summary |
Nested classes inherited from class PageBoxLib.TokenImpl |
TokenImpl.Context, TokenImpl.TokenThread |
Nested classes inherited from class PageBoxLib.DeployIF |
DeployIF.Status, DeployIF.UrlUser |
Field Summary | |
(package private) java.util.TreeMap |
archives
Archives currently installed Key: archive name Value: Archive object |
(package private) ASInstallIF |
ASInstaller
Application Server Installation object |
(package private) static int |
COPY
Copy |
(package private) static int |
INSTALL
Installation from docURL |
(package private) static int |
NONE
No authorization |
(package private) RepoTest |
rt
Used to test the Repository |
(package private) RuleHandler.Rule |
rule
Memory representation of rules.xml |
(package private) boolean |
rulesOK
True if initialize succeeded |
(package private) java.lang.String |
subUrl
URL of the DeployIF web service of this PageBox |
(package private) java.lang.String |
target
Actual target from rule.target |
Fields inherited from class PageBoxLib.TokenImpl |
ctx, log, period, pingFrame, tcbi, tctx, tt, workDir |
Constructor Summary | |
DeployImpl()
|
Method Summary | |
DeployIF.Status |
add(java.lang.String arch,
java.lang.String downloadURL,
java.lang.String owner,
byte[] archData,
java.lang.String date,
java.lang.String oldDate,
java.lang.String docURL,
java.lang.String user,
boolean isUpdate,
boolean runInstall,
DeployIF.UrlUser[] relayed)
DeployIF method. |
private DeployIF.Status |
addToPbArchs(java.lang.String arch,
java.lang.String downloadURL,
java.lang.String owner,
byte[] archData,
java.lang.String date,
java.lang.String oldDate,
java.lang.String docURL,
java.lang.String user,
boolean isUpdate,
boolean runInstall,
DeployIF.UrlUser[] relayed)
Deploys an archive and returns a status. |
DeployIF.Status |
delete(java.lang.String arch,
java.lang.String downloadURL,
java.lang.String owner,
java.lang.String user,
boolean runRemove,
boolean keepDir)
DeployIF method. |
private void |
deleteDir(java.io.File f)
Recursive directory delete. |
private DeployIF.Status |
deleteFromPbArchs(java.lang.String arch,
java.lang.String downloadURL,
java.lang.String owner,
java.lang.String user,
boolean runRemove,
boolean keepDir)
Undeploys an archive and returns a status. |
void |
destroy()
ServiceLifeCycle method. |
java.lang.String |
getArchPath(java.lang.String arch)
DeployIF method. |
java.lang.String |
getAudit(java.lang.String arch,
java.lang.String owner,
java.lang.String user,
java.lang.String downloadURL)
DeployIF method. |
private static java.lang.String |
getAuthFromRule(int rule)
Format a rule string for tracing |
private void |
init()
Common initialization stuff. |
void |
init(java.lang.Object context)
ServiceLifeCycle method. |
void |
init2(ServletContext ctx)
Method called by HTTPDeploy |
private boolean |
initialize()
Authorization restore from rules.xml. |
private DeployIF.Status |
install(java.lang.String arch,
java.lang.String downloadURL,
java.lang.String docURL,
byte[] archData,
boolean isUpdate,
boolean isUpdate2,
boolean runInstall,
int auth,
InstallHelper ih)
Installs an archive and returns a status. |
private java.util.ArrayList |
listRules(java.util.HashMap rules)
Enumerates publisherRules or repositoryRules. |
java.lang.String |
rename(java.lang.String oldDownloadURL,
java.lang.String newDownloadURL,
java.lang.String user)
DeployIF method. |
private java.lang.String |
renameRepository(java.lang.String oldDownloadURL,
java.lang.String newDownloadURL,
java.lang.String user)
Change the repository URL. |
private java.lang.String |
renameRepository2(java.lang.String oldDownloadURL,
java.lang.String newDownloadURL)
Change the repository URL. |
private java.lang.String |
restorePbArchs()
Parse PbArchives.xml and set the archives HashMap. |
private java.lang.String |
savePbArchs()
Save the archives HashMap in PbArchives.xml. |
private void |
saveRules()
Save rules.xml. |
private DeployIF.Status |
uninstall(java.lang.String arch,
java.lang.String downloadURL,
java.lang.String docURL,
boolean isUpdate,
boolean runRemove,
int auth,
java.util.HashMap resources)
Uninstalls an archive and returns a status. |
Methods inherited from class PageBoxLib.TokenImpl |
end, frameSend, frameSend2, frameSend3, test, tokenInit, tokenRenameRepository |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface PageBoxLib.TokenIF |
frameSend |
Field Detail |
java.util.TreeMap archives
java.lang.String subUrl
java.lang.String target
static final int NONE
static final int COPY
static final int INSTALL
ASInstallIF ASInstaller
boolean rulesOK
RepoTest rt
RuleHandler.Rule rule
Constructor Detail |
public DeployImpl()
Method Detail |
public DeployIF.Status add(java.lang.String arch, java.lang.String downloadURL, java.lang.String owner, byte[] archData, java.lang.String date, java.lang.String oldDate, java.lang.String docURL, java.lang.String user, boolean isUpdate, boolean runInstall, DeployIF.UrlUser[] relayed)
Deploys an archive and returns a status.
add
in interface DeployIF
arch
- archive name.downloadURL
- download URL.owner
- user who published the archive.archData
- archive data.date
- publication date and time.oldDate
- expected previous publication date and time.docURL
- documentation URL.user
- user who subscribed the PageBox.isUpdate
- if true delta updaterunInstall
- if true run the Application server installer (Web application)relayed
- PageBox instances to deploy
public DeployIF.Status delete(java.lang.String arch, java.lang.String downloadURL, java.lang.String owner, java.lang.String user, boolean runRemove, boolean keepDir)
Undeploys an archive and returns a status.
delete
in interface DeployIF
arch
- archive name.downloadURL
- download URL.owner
- user who published the archive.user
- user who subscribed the PageBox.runRemove
- if true run the Application server installer (Web application)keepDir
- keep directory
public java.lang.String rename(java.lang.String oldDownloadURL, java.lang.String newDownloadURL, java.lang.String user)
Change the repository URL.
rename
in interface DeployIF
oldDownloadURL
- previous download URL for some archivesnewDownloadURL
- new download URL for these archivesuser
- user who subscribed the PageBox.
public void init(java.lang.Object context) throws ServiceException
Called at initialization.
context
- ServletEndpoint Context
ServiceException
public void init2(ServletContext ctx)
ctx
- servlet contextprivate void init()
public void destroy()
private java.lang.String renameRepository(java.lang.String oldDownloadURL, java.lang.String newDownloadURL, java.lang.String user)
oldDownloadURL
- previous download URL for some archivesnewDownloadURL
- new download URL for these archivesuser
- user who subscribed the PageBox.
private java.lang.String renameRepository2(java.lang.String oldDownloadURL, java.lang.String newDownloadURL)
oldDownloadURL
- previous download URL for some archivesnewDownloadURL
- new download URL for these archives
private void saveRules()
private DeployIF.Status addToPbArchs(java.lang.String arch, java.lang.String downloadURL, java.lang.String owner, byte[] archData, java.lang.String date, java.lang.String oldDate, java.lang.String docURL, java.lang.String user, boolean isUpdate, boolean runInstall, DeployIF.UrlUser[] relayed)
arch
- archive name.downloadURL
- download URL.owner
- user who published the archive.archData
- archive data.date
- publication date and time.oldDate
- expected previous publication date and time.docURL
- documentation URL.user
- user who requested the deploy.isUpdate
- if true delta updaterunInstall
- if true run the Application server installer (Web application)relayed
- PageBox instances to deploy
private java.util.ArrayList listRules(java.util.HashMap rules)
rules
- publisherRules or repositoryRules
private DeployIF.Status deleteFromPbArchs(java.lang.String arch, java.lang.String downloadURL, java.lang.String owner, java.lang.String user, boolean runRemove, boolean keepDir)
arch
- archive name.downloadURL
- download URL.owner
- user who published the archive.user
- user who requested the deploy.runRemove
- if true run the Application server installer (Web application)keepDir
- keep directory
private DeployIF.Status install(java.lang.String arch, java.lang.String downloadURL, java.lang.String docURL, byte[] archData, boolean isUpdate, boolean isUpdate2, boolean runInstall, int auth, InstallHelper ih)
In 0.0.7 we chose using getCause (1.4) rather than getException (1.2) to retrieve the first exception. Replace getCause by getException if needed.
arch
- archive name.downloadURL
- download URL.docURL
- documentation URL.archData
- archive data.isUpdate
- if true delta updateisUpdate2
- if true replaces an older versionrunInstall
- if true run the Application server installer (Web application)auth
- COPY or INSTALL authorization
private DeployIF.Status uninstall(java.lang.String arch, java.lang.String downloadURL, java.lang.String docURL, boolean isUpdate, boolean runRemove, int auth, java.util.HashMap resources)
In 0.0.7 we chose using getCause (1.4) rather than getException (1.2) to retrieve the first exception. Replace getCause by getException if needed.
arch
- archive name.docURL
- documentation URL.isUpdate
- if true don't delete the archiverunRemove
- if true run the Application server installer (Web application)auth
- COPY or INSTALL authorization
private void deleteDir(java.io.File f)
f
- directory File objectpublic java.lang.String getArchPath(java.lang.String arch)
getArchPath
in interface DeployIF
arch
- archive name
private java.lang.String restorePbArchs()
private java.lang.String savePbArchs()
private boolean initialize()
private static final java.lang.String getAuthFromRule(int rule)
rule
- NONE, COPY or INSTALL
public java.lang.String getAudit(java.lang.String arch, java.lang.String owner, java.lang.String user, java.lang.String downloadURL)
getAudit
in interface DeployIF
arch
- archive nameowner
- user who published the archive.user
- user who subscribed the PageBox.downloadURL
- download URL.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |