PHP Класс AppserverIo\Appserver\Core\AbstractExtractor

Автор: Johann Zelger ([email protected])
Наследование: implements AppserverIo\Appserver\Core\Interfaces\ExtractorInterface
Показать файл Открыть проект

Защищенные свойства (Protected)

Свойство Тип Описание
$extractorNode AppserverIo\Appserver\Core\Api\Node\ExtractorNodeInterface The extractor node configuration data.
$initialContext AppserverIo\Appserver\Application\Interfaces\ContextInterface The initial context instance.
$service string The container's base directory.

Открытые методы

Метод Описание
__construct ( AppserverIo\Appserver\Application\Interfaces\ContextInterface $initialContext, AppserverIo\Appserver\Core\Api\Node\ExtractorNodeInterface $extractorNode ) Constructor to initialize the extractor instance with the initial context and the extractor node configuration data.
copyDir ( string $src, string $dst ) : void Copies a directory recursively.
deployWebapps ( ) : void Will actually deploy all webapps.
flagArchive ( SplFileInfo $archive, string $flag ) : void Flags the archive in specific states of extraction
getDeployDir ( AppserverIo\Appserver\Core\Api\Node\ContainerNodeInterface $containerNode, string $relativePathToAppend = '' ) : string Returns the container's deploy directory.
getExtractorNode ( ) : AppserverIo\Appserver\Core\Api\Node\ExtractorNodeInterface Returns the extractor node configuration data.
getInitialContext ( ) : AppserverIo\Appserver\Application\Interfaces\ContextInterface Returns the inital context instance.
getService ( ) : AppserverIo\Appserver\Core\Api\AbstractFileOperationService Returns the service instance to use.
getTmpDir ( AppserverIo\Appserver\Core\Api\Node\ContainerNodeInterface $containerNode, string $relativePathToAppend = '' ) : string Returns the container's tmp directory.
getWebappsDir ( AppserverIo\Appserver\Core\Api\Node\ContainerNodeInterface $containerNode, string $relativePathToAppend = '' ) : string Returns the container's webapps directory.
isDeployable ( SplFileInfo $archive ) : boolean (non-PHPdoc)
isUndeployable ( SplFileInfo $archive ) : boolean (non-PHPdoc)
newService ( string $className ) : AppserverIo\Appserver\Core\Api\ServiceInterface (non-PHPdoc)
restoreBackup ( AppserverIo\Appserver\Core\Api\Node\ContainerNodeInterface $containerNode, SplFileInfo $archive ) : void Restores the backup files from the backup directory.
soakArchive ( AppserverIo\Appserver\Core\Api\Node\ContainerNodeInterface $containerNode, SplFileInfo $archive ) : void (non-PHPdoc)
undeployArchive ( AppserverIo\Appserver\Core\Api\Node\ContainerNodeInterface $containerNode, SplFileInfo $archive ) : void (non-PHPdoc)
unflagArchive ( SplFileInfo $archive ) : void Deletes all old flags, so the app will be undeployed with the next appserver restart.

Защищенные методы

Метод Описание
getFlags ( ) : array Returns all flags in array.
removeDir ( SplFileInfo $dir, boolean $alsoRemoveFiles = true ) : void Removes a directory recursively.
setUserRight ( SplFileInfo $fileInfo ) : void Sets the configured user/group settings on the passed file.
setUserRights ( SplFileInfo $targetDir ) : void Will set the owner and group on the passed directory.

Описание методов

__construct() публичный Метод

Constructor to initialize the extractor instance with the initial context and the extractor node configuration data.
public __construct ( AppserverIo\Appserver\Application\Interfaces\ContextInterface $initialContext, AppserverIo\Appserver\Core\Api\Node\ExtractorNodeInterface $extractorNode )
$initialContext AppserverIo\Appserver\Application\Interfaces\ContextInterface The initial context instance
$extractorNode AppserverIo\Appserver\Core\Api\Node\ExtractorNodeInterface The extractor node configuration data

copyDir() публичный Метод

Copies a directory recursively.
См. также: AppserverIo\Appserver\Core\Api\AbstractService::copyDir()
public copyDir ( string $src, string $dst ) : void
$src string The source directory to copy
$dst string The target directory
Результат void

deployWebapps() публичный Метод

Will actually deploy all webapps.
public deployWebapps ( ) : void
Результат void

flagArchive() публичный Метод

Flags the archive in specific states of extraction
public flagArchive ( SplFileInfo $archive, string $flag ) : void
$archive SplFileInfo The archive to flag
$flag string The flag to set
Результат void

getDeployDir() публичный Метод

Returns the container's deploy directory.
public getDeployDir ( AppserverIo\Appserver\Core\Api\Node\ContainerNodeInterface $containerNode, string $relativePathToAppend = '' ) : string
$containerNode AppserverIo\Appserver\Core\Api\Node\ContainerNodeInterface The container to return the temporary directory for
$relativePathToAppend string A relative path to append
Результат string

getExtractorNode() публичный Метод

Returns the extractor node configuration data.
public getExtractorNode ( ) : AppserverIo\Appserver\Core\Api\Node\ExtractorNodeInterface
Результат AppserverIo\Appserver\Core\Api\Node\ExtractorNodeInterface The extractor node configuration data

getFlags() защищенный Метод

Returns all flags in array.
protected getFlags ( ) : array
Результат array

getInitialContext() публичный Метод

Returns the inital context instance.
public getInitialContext ( ) : AppserverIo\Appserver\Application\Interfaces\ContextInterface
Результат AppserverIo\Appserver\Application\Interfaces\ContextInterface The initial context instance

getService() публичный Метод

Returns the service instance to use.
public getService ( ) : AppserverIo\Appserver\Core\Api\AbstractFileOperationService
Результат AppserverIo\Appserver\Core\Api\AbstractFileOperationService $service The service to use

getTmpDir() публичный Метод

Returns the container's tmp directory.
public getTmpDir ( AppserverIo\Appserver\Core\Api\Node\ContainerNodeInterface $containerNode, string $relativePathToAppend = '' ) : string
$containerNode AppserverIo\Appserver\Core\Api\Node\ContainerNodeInterface The container to return the temporary directory for
$relativePathToAppend string A relative path to append
Результат string

getWebappsDir() публичный Метод

Returns the container's webapps directory.
public getWebappsDir ( AppserverIo\Appserver\Core\Api\Node\ContainerNodeInterface $containerNode, string $relativePathToAppend = '' ) : string
$containerNode AppserverIo\Appserver\Core\Api\Node\ContainerNodeInterface The container to return the temporary directory for
$relativePathToAppend string A relative path to append
Результат string The web application directory

isDeployable() публичный Метод

(non-PHPdoc)
См. также: AppserverIo\Appserver\Core\Interfaces\ExtractorInterface::isDeployable()
public isDeployable ( SplFileInfo $archive ) : boolean
$archive SplFileInfo The archive object
Результат boolean

isUndeployable() публичный Метод

(non-PHPdoc)
См. также: AppserverIo\Appserver\Core\Interfaces\ExtractorInterface::isUndeployable()
public isUndeployable ( SplFileInfo $archive ) : boolean
$archive SplFileInfo The archive object
Результат boolean

newService() публичный Метод

(non-PHPdoc)
См. также: AppserverIo\Appserver\Core\InitialContext::newService()
public newService ( string $className ) : AppserverIo\Appserver\Core\Api\ServiceInterface
$className string The API service class name to return the instance for
Результат AppserverIo\Appserver\Core\Api\ServiceInterface The service instance

removeDir() защищенный Метод

Removes a directory recursively.
protected removeDir ( SplFileInfo $dir, boolean $alsoRemoveFiles = true ) : void
$dir SplFileInfo The directory to remove
$alsoRemoveFiles boolean The flag for removing files also
Результат void

restoreBackup() публичный Метод

Restores the backup files from the backup directory.
public restoreBackup ( AppserverIo\Appserver\Core\Api\Node\ContainerNodeInterface $containerNode, SplFileInfo $archive ) : void
$containerNode AppserverIo\Appserver\Core\Api\Node\ContainerNodeInterface The container the archive belongs to
$archive SplFileInfo To restore the files for
Результат void

setUserRight() защищенный Метод

Sets the configured user/group settings on the passed file.
protected setUserRight ( SplFileInfo $fileInfo ) : void
$fileInfo SplFileInfo The file to set user/group for
Результат void

setUserRights() защищенный Метод

Will set the owner and group on the passed directory.
protected setUserRights ( SplFileInfo $targetDir ) : void
$targetDir SplFileInfo The directory to set the rights for
Результат void

soakArchive() публичный Метод

(non-PHPdoc)
См. также: AppserverIo\Appserver\Core\Interfaces\ExtractorInterface::soakArchive()
public soakArchive ( AppserverIo\Appserver\Core\Api\Node\ContainerNodeInterface $containerNode, SplFileInfo $archive ) : void
$containerNode AppserverIo\Appserver\Core\Api\Node\ContainerNodeInterface The container the archive belongs to
$archive SplFileInfo The archive to be soaked
Результат void

undeployArchive() публичный Метод

(non-PHPdoc)
См. также: AppserverIo\Appserver\Core\Interfaces\ExtractorInterface::undeployArchive()
public undeployArchive ( AppserverIo\Appserver\Core\Api\Node\ContainerNodeInterface $containerNode, SplFileInfo $archive ) : void
$containerNode AppserverIo\Appserver\Core\Api\Node\ContainerNodeInterface The container the archive belongs to
$archive SplFileInfo The archive file to be undeployed
Результат void

unflagArchive() публичный Метод

Deletes all old flags, so the app will be undeployed with the next appserver restart.
public unflagArchive ( SplFileInfo $archive ) : void
$archive SplFileInfo The archive to unflag
Результат void

Описание свойств

$extractorNode защищенное свойство

The extractor node configuration data.
protected ExtractorNodeInterface,AppserverIo\Appserver\Core\Api\Node $extractorNode
Результат AppserverIo\Appserver\Core\Api\Node\ExtractorNodeInterface

$initialContext защищенное свойство

The initial context instance.
protected ContextInterface,AppserverIo\Appserver\Application\Interfaces $initialContext
Результат AppserverIo\Appserver\Application\Interfaces\ContextInterface

$service защищенное свойство

The container's base directory.
protected string $service
Результат string