public class WebappAdmin
extends org.wso2.carbon.core.AbstractAdmin
| Constructor and Description |
|---|
WebappAdmin() |
WebappAdmin(org.apache.axis2.engine.AxisConfiguration axisConfig) |
| Modifier and Type | Method and Description |
|---|---|
void |
changeDefaultAppVersion(String appGroupName,
String fileName,
String hostName) |
void |
deleteAllFaultyWebapps()
Delete all faulty webapps
|
void |
deleteAllStartedWebapps()
Delete all started webapps
|
void |
deleteAllStoppedWebapps()
Delete all stopped webapps
|
void |
deleteAllWebApps(String[] webappKey)
Delete set of all types of webapps.
|
void |
deleteFaultyWebapps(String[] webappKey)
Delete a set of faulty webapps
|
void |
deleteStartedWebapps(String[] webappKey)
Delete a set of started webapps
|
void |
deleteStoppedWebapps(String[] webappKey)
Delete a set of stopped webapps
|
protected boolean |
doesWebappSatisfySearchString(WebApplication webapp,
String searchString) |
DataHandler |
downloadWarFileHandler(String fileName,
String hostName,
String webappType)
Downloads the webapp archive (.war) file
|
void |
expireAllSessions(String webappKey)
Expire a given session in a webapp
|
void |
expireSessions(String webappFileName,
String[] sessionIDs,
String hostName)
Expire a given session in a webapp
|
void |
expireSessionsInAllWebapps()
Expire all sessions in all webapps
|
void |
expireSessionsInWebapp(String webappKey,
long maxSessionLifetimeMillis)
Expire all sessions in the specified webapp which has a
lifetime >=
maxSessionLifetimeMillis |
void |
expireSessionsInWebapps(String[] webappKeySet)
Expire all sessions in specified webapps
|
SessionsWrapper |
getActiveSessions(String webappFileName,
int pageNumber,
String hostName)
Get all active sessions of a webapp
|
String |
getBamConfiguration(String webappFileName,
String hostName)
This method returns the bam configuration statistic enabled or not
|
WebappsWrapper |
getPagedFaultyWebappsSummary(String webappSearchString,
String webappType,
int pageNumber) |
WebappsWrapper |
getPagedWebappsSummary(String webappSearchString,
String webappState,
String webappType,
int pageNumber)
Get a page of started webapps
|
WebappMetadata |
getStartedWebapp(String webappFileName,
String hostName)
Get the details of a deplyed webapp
|
WebappMetadata |
getStoppedWebapp(String webappFileName,
String hostName)
Get the details of an stopped webapp
|
VhostHolder |
getVhostHolder() |
protected String |
getWebappDeploymentDirPath(String webappType) |
protected String |
getWebappDeploymentDirPath(String webappType,
String hostName) |
protected String |
getWebappDeploymentFile(String fileName,
String hostName,
String webappType)
Return the location of the actual webapp file
|
boolean |
isDefaultVersionManagementEnabled() |
boolean |
isUnpackWARs()
check if unpack wars enabled
|
protected boolean |
isWebappRelevant(WebApplication webapp,
String webappType)
This method can be used to check whether the given web app is relevant for this Webapp
type.
|
void |
reloadAllWebapps()
Reload all webapps
|
void |
reloadWebapps(String[] webappKey)
Reload a set of webapps
|
void |
setBamConfiguration(String webappFileName,
String value,
String hostName)
Reset the bam enable and disable option.
|
void |
startAllWebapps()
Redeploy all webapps
|
void |
startWebapps(String[] webappKeys)
Redeploy a set of webapps
|
void |
stopAllWebapps()
Undeploy all webapps
|
void |
stopWebapps(String[] webappKeys)
Undeploy a set of webapps
|
boolean |
uploadWebapp(WebappUploadData[] webappUploadDataList)
Upload a webapp
|
getAxisConfig, getConfigContext, getConfigSystemRegistry, getConfigUserRegistry, getGovernanceRegistry, getGovernanceSystemRegistry, getGovernanceUserRegistry, getHttpSession, getLocalRepo, getRegistry, getTenantDomain, getUsername, getUserRealm, setConfigurationContext, setPermissionUpdateTimestamppublic WebappsWrapper getPagedWebappsSummary(String webappSearchString, String webappState, String webappType, int pageNumber) throws org.apache.axis2.AxisFault
webappSearchString - Search stringwebappState - State of the webapp.
Can be either WebappsConstants.WebappState.STARTED or
WebappsConstants.WebappState.STOPPEDwebappType - application typepageNumber - The pageNumber of the page to be fetchedorg.apache.axis2.AxisFaultpublic WebappMetadata getStartedWebapp(String webappFileName, String hostName)
webappFileName - hostName - public WebappMetadata getStoppedWebapp(String webappFileName, String hostName)
webappFileName - hostName - public WebappsWrapper getPagedFaultyWebappsSummary(String webappSearchString, String webappType, int pageNumber) throws org.apache.axis2.AxisFault
webappSearchString - webappType - application typepageNumber - org.apache.axis2.AxisFaultprotected boolean doesWebappSatisfySearchString(WebApplication webapp, String searchString)
protected boolean isWebappRelevant(WebApplication webapp, String webappType)
webapp - - WebApplication instancewebappType - application typepublic void deleteStartedWebapps(String[] webappKey) throws org.apache.axis2.AxisFault
webappKey - The name:hostname pairs of the webapp files to be deletedorg.apache.axis2.AxisFault - If an error occurs while deleting a webapppublic void deleteStoppedWebapps(String[] webappKey) throws org.apache.axis2.AxisFault
webappKey - The name:hostname pairs of the webapp files to be deletedorg.apache.axis2.AxisFault - If an error occurs while deleting a webapppublic void deleteFaultyWebapps(String[] webappKey) throws org.apache.axis2.AxisFault
webappKey - The name:hostname pairs of the webapp files to be deletedorg.apache.axis2.AxisFault - If an error occurs while deleting a webapppublic void deleteAllWebApps(String[] webappKey) throws org.apache.axis2.AxisFault
webappKey - The name:hostname pairs of the webapp files to be deletedorg.apache.axis2.AxisFault - AxisFault If an error occurs while deleting a webapppublic void deleteAllStartedWebapps()
throws org.apache.axis2.AxisFault
org.apache.axis2.AxisFault - If an error occurs while deleting a webapppublic void deleteAllStoppedWebapps()
throws org.apache.axis2.AxisFault
org.apache.axis2.AxisFault - If an error occurs while deleting a webapppublic void deleteAllFaultyWebapps()
throws org.apache.axis2.AxisFault
org.apache.axis2.AxisFault - If an error occurs while deleting a webapppublic void reloadAllWebapps()
public void reloadWebapps(String[] webappKey)
webappKey - The file_name:hostname pairs of the webapps to be reloadedpublic void setBamConfiguration(String webappFileName, String value, String hostName)
webappFileName - value - public String getBamConfiguration(String webappFileName, String hostName)
webappFileName - public void stopAllWebapps()
throws org.apache.axis2.AxisFault
org.apache.axis2.AxisFault - If an error occurs while undeployingpublic void stopWebapps(String[] webappKeys) throws org.apache.axis2.AxisFault
webappKeys - The hostname:file_name pairs of the webapps to be stoppedorg.apache.axis2.AxisFault - If an error occurs while undeployingpublic void startAllWebapps()
throws org.apache.axis2.AxisFault
org.apache.axis2.AxisFault - If an error occurs while restarting webappspublic void startWebapps(String[] webappKeys) throws org.apache.axis2.AxisFault
webappKeys - The hostname:file_name pairs of the webapps to be restartedorg.apache.axis2.AxisFault - If a deployment error occurspublic SessionsWrapper getActiveSessions(String webappFileName, int pageNumber, String hostName)
webappFileName - The names of the webapp filepageNumber - The number of the page to fetch, starting with 0public void expireSessionsInAllWebapps()
public void expireSessionsInWebapps(String[] webappKeySet)
webappKeySet - The file names of the webapps whose sessions should be expiredpublic void expireSessionsInWebapp(String webappKey, long maxSessionLifetimeMillis)
maxSessionLifetimeMilliswebappKey - The file name of the webapp whose sessions should be expiredmaxSessionLifetimeMillis - The max allowed lifetime for the sessionspublic void expireSessions(String webappFileName, String[] sessionIDs, String hostName) throws org.apache.axis2.AxisFault
webappFileName - The file name of the webapp whose sessions should be expiredsessionIDs - Array of session IDsorg.apache.axis2.AxisFault - If an error occurs while retrieving sessionspublic void expireAllSessions(String webappKey)
webappKey - The hostname:file_name pairs of the webapp whose sessions should be expiredpublic boolean uploadWebapp(WebappUploadData[] webappUploadDataList) throws org.apache.axis2.AxisFault
webappUploadDataList - Array of data representing the webapps that are to be uploadedorg.apache.axis2.AxisFault - If an error occurrs while uploadingprotected String getWebappDeploymentDirPath(String webappType, String hostName)
protected String getWebappDeploymentFile(String fileName, String hostName, String webappType)
fileName - name of the webapp filewebappType - type of the webapppublic DataHandler downloadWarFileHandler(String fileName, String hostName, String webappType)
fileName - name of the .war that needs to be downloadedwebappType - application typehostName - virtualhostpublic boolean isUnpackWARs()
public void changeDefaultAppVersion(String appGroupName, String fileName, String hostName) throws org.apache.axis2.AxisFault, org.wso2.carbon.core.persistence.metadata.ArtifactMetadataException
org.apache.axis2.AxisFaultorg.wso2.carbon.core.persistence.metadata.ArtifactMetadataExceptionpublic boolean isDefaultVersionManagementEnabled()
public VhostHolder getVhostHolder()
Copyright © 2021 WSO2. All rights reserved.