/** * Creates a new app node for the passed application and attaches * it to the system configuration. * * @param \AppserverIo\Psr\Application\ApplicationInterface $application The application to create a new AppNode for * * @return void */ public function newFromApplication(ApplicationInterface $application) { // create a new AppNode and initialize it $appNode = new AppNode(); $appNode->initFromApplication($application); $appNode->setParentUuid($this->getSystemConfiguration()->getUuid()); // persist the AppNode instance $this->persist($appNode); }
/** * If we can determine if a passed UUID is an invalid one * * @return null */ public function testUndeployInvalidUuid() { $mockExtractor = $this->getMock('\\AppserverIo\\Appserver\\Core\\Interfaces\\ExtractorInterface'); $mockExtractor->expects($this->never())->method('unflagArchive'); $this->appService->injectExtractor($mockExtractor); $appNode = new AppNode(__METHOD__, '/opt/appserver/targetwebapp'); $this->appService->undeploy($appNode->getUuid()); }
/** * Attaches the passed app node. * * @param \AppserverIo\Appserver\Core\Api\Node\AppNode $app The app node to attach * * @return void */ public function attachApp(AppNode $app) { $this->apps[$app->getPrimaryKey()] = $app; }