PHP Class AppserverIo\Appserver\Core\Api\AppService

Inheritance: extends AppserverIo\Appserver\Core\Api\AbstractFileOperationService
Show file Open project: appserver-io/appserver Class Usage Examples

Protected Properties

Property Type Description
$extractor AppserverIo\Appserver\Core\Interfaces\ExtractorInterface The extractor instance to handle archive operations with

Public Methods

Method Description
cleanUpFolders ( AppserverIo\Psr\Application\ApplicationInterface $application ) : void Clean up the the directories for the webapp, e. g. to delete cached stuff that has to be recreated after a restart.
createTmpFolders ( AppserverIo\Psr\Application\ApplicationInterface $application ) : void Creates the temporary directory for the webapp.
deploy ( AppserverIo\Appserver\Core\Api\Node\ContainerNodeInterface $containerNode, AppserverIo\Configuration\Interfaces\NodeInterface $appNode ) : void Adds the .dodeploy flag file in the deploy folder, therefore the app will be deployed with the next restart.
findAll ( ) : array Returns all deployed applications.
findAllByName ( string $name ) : array Returns the applications with the passed name.
getExtractor ( ) : AppserverIo\Appserver\Core\Interfaces\ExtractorInterface | null Getter for this service's extractor
injectExtractor ( AppserverIo\Appserver\Core\Interfaces\ExtractorInterface $extractor ) : null Will inject a certain extractor to be used
load ( string $uuid ) : AppNode | null Returns the application with the passed UUID.
loadByWebappPath ( string $webappPath ) : AppNode | null Returns the application with the passed webapp path.
newFromApplication ( AppserverIo\Psr\Application\ApplicationInterface $application ) : void Creates a new app node for the passed application and attaches it to the system configuration.
persist ( AppserverIo\Configuration\Interfaces\NodeInterface $appNode ) : void Persists the system configuration.
soak ( AppserverIo\Appserver\Core\Api\Node\ContainerNodeInterface $containerNode, SplFileInfo $archive ) : void Soaks the passed archive into from a location in the filesystem to the deploy directory.
undeploy ( AppserverIo\Appserver\Core\Api\Node\ContainerNodeInterface $containerNode, string $uuid ) : void Removes the .deployed flag file from the deploy folder, therefore the app will be undeployed with the next restart.

Method Details

cleanUpFolders() public method

Clean up the the directories for the webapp, e. g. to delete cached stuff that has to be recreated after a restart.
public cleanUpFolders ( AppserverIo\Psr\Application\ApplicationInterface $application ) : void
$application AppserverIo\Psr\Application\ApplicationInterface The application to clean up the directories for
return void

createTmpFolders() public method

Creates the temporary directory for the webapp.
public createTmpFolders ( AppserverIo\Psr\Application\ApplicationInterface $application ) : void
$application AppserverIo\Psr\Application\ApplicationInterface The application to create the temporary directories for
return void

deploy() public method

Adds the .dodeploy flag file in the deploy folder, therefore the app will be deployed with the next restart.
public deploy ( AppserverIo\Appserver\Core\Api\Node\ContainerNodeInterface $containerNode, AppserverIo\Configuration\Interfaces\NodeInterface $appNode ) : void
$containerNode AppserverIo\Appserver\Core\Api\Node\ContainerNodeInterface The container the app is bound to
$appNode AppserverIo\Configuration\Interfaces\NodeInterface The application node object
return void

findAll() public method

Returns all deployed applications.
See also: ServiceInterface::findAll()
public findAll ( ) : array
return array All deployed applications

findAllByName() public method

Returns the applications with the passed name.
public findAllByName ( string $name ) : array
$name string Name of the application to return
return array The applications with the name passed as parameter

getExtractor() public method

Getter for this service's extractor
public getExtractor ( ) : AppserverIo\Appserver\Core\Interfaces\ExtractorInterface | null
return AppserverIo\Appserver\Core\Interfaces\ExtractorInterface | null

injectExtractor() public method

Will inject a certain extractor to be used
public injectExtractor ( AppserverIo\Appserver\Core\Interfaces\ExtractorInterface $extractor ) : null
$extractor AppserverIo\Appserver\Core\Interfaces\ExtractorInterface The extractor instance to inject
return null

load() public method

Returns the application with the passed UUID.
See also: ServiceInterface::load()
public load ( string $uuid ) : AppNode | null
$uuid string UUID of the application to return
return AppserverIo\Appserver\Core\Api\Node\AppNode | null The application with the UUID passed as parameter

loadByWebappPath() public method

Returns the application with the passed webapp path.
public loadByWebappPath ( string $webappPath ) : AppNode | null
$webappPath string webapp path of the application to return
return AppserverIo\Appserver\Core\Api\Node\AppNode | null The application with the webapp path passed as parameter

newFromApplication() public method

Creates a new app node for the passed application and attaches it to the system configuration.
public newFromApplication ( AppserverIo\Psr\Application\ApplicationInterface $application ) : void
$application AppserverIo\Psr\Application\ApplicationInterface The application to create a new AppNode for
return void

persist() public method

Persists the system configuration.
public persist ( AppserverIo\Configuration\Interfaces\NodeInterface $appNode ) : void
$appNode AppserverIo\Configuration\Interfaces\NodeInterface The application node object
return void

soak() public method

Soaks the passed archive into from a location in the filesystem to the deploy directory.
public soak ( AppserverIo\Appserver\Core\Api\Node\ContainerNodeInterface $containerNode, SplFileInfo $archive ) : void
$containerNode AppserverIo\Appserver\Core\Api\Node\ContainerNodeInterface The container the archive is bound to
$archive SplFileInfo The archive to soak
return void

undeploy() public method

Removes the .deployed flag file from the deploy folder, therefore the app will be undeployed with the next restart.
public undeploy ( AppserverIo\Appserver\Core\Api\Node\ContainerNodeInterface $containerNode, string $uuid ) : void
$containerNode AppserverIo\Appserver\Core\Api\Node\ContainerNodeInterface The container the app is bound to
$uuid string UUID of the application to delete
return void

Property Details

$extractor protected property

The extractor instance to handle archive operations with
protected ExtractorInterface,AppserverIo\Appserver\Core\Interfaces $extractor
return AppserverIo\Appserver\Core\Interfaces\ExtractorInterface