Author: Tim Wagner (tw@appserver.io)
Inheritance: extends AppserverIo\Description\Api\Node\AbstractNode, implements AppserverIo\Appserver\Core\Api\Node\AppNodeInterface
示例#1
0
 /**
  * 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);
 }
示例#2
0
 /**
  * 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());
 }
示例#3
0
 /**
  * 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;
 }