Examples of PackageManager


Examples of org.apache.jackrabbit.vault.packaging.PackageManager

    @Test
    public void testInstallPackageInternal() throws Exception {
        File tempFile = File.createTempFile("testInstallPackageInternal", "txt");
        Packaging packaging = mock(Packaging.class);
        PackageManager packageManager = mock(PackageManager.class);
        VaultPackage vaultPackage = mock(VaultPackage.class);
        when(packageManager.open(tempFile)).thenReturn(vaultPackage);
        when(packaging.getPackageManager()).thenReturn(packageManager);
        ReplicationEventFactory eventFactory = mock(ReplicationEventFactory.class);

        FileVaultReplicationPackageBuilder fileVaultReplicationPackageBuilder = new FileVaultReplicationPackageBuilder(
                packaging, eventFactory);
View Full Code Here

Examples of org.apache.jackrabbit.vault.packaging.PackageManager

    @Test
    public void testInstallWithCustomImportModeAndACLHandling() throws Exception {
        File tempFile = File.createTempFile("testInstallPackageInternal", "txt");
        Packaging packaging = mock(Packaging.class);
        PackageManager packageManager = mock(PackageManager.class);
        VaultPackage vaultPackage = mock(VaultPackage.class);
        when(packageManager.open(tempFile)).thenReturn(vaultPackage);
        when(packaging.getPackageManager()).thenReturn(packageManager);
        ReplicationEventFactory eventFactory = mock(ReplicationEventFactory.class);

        FileVaultReplicationPackageBuilder fileVaultReplicationPackageBuilder = new FileVaultReplicationPackageBuilder(
                packaging, eventFactory, ImportMode.MERGE.name(), AccessControlHandling.MERGE.name());
View Full Code Here

Examples of org.apache.maven.jxr.pacman.PackageManager

    @Override
    protected void setUp()
        throws Exception
    {
        super.setUp();
        packageManager = new PackageManager( new DummyLog(), new FileManager() );
        codeTransform = new JavaCodeTransform( packageManager );
    }
View Full Code Here

Examples of org.apache.maven.jxr.pacman.PackageManager

    {
        // first collect package and class info
        FileManager fileManager = new FileManager();
        fileManager.setEncoding( inputEncoding );

        PackageManager pkgmgr = new PackageManager( log, fileManager );
        pkgmgr.setExcludes( excludes );
        pkgmgr.setIncludes( includes );

        // go through each source directory and xref the java files
        for ( Iterator i = sourceDirs.iterator(); i.hasNext(); )
        {
            String path = (String) i.next();
            path = new File( path ).getCanonicalPath();

            pkgmgr.process( path );

            processPath( pkgmgr, path, bottom );
        }

        // once we have all the source files xref'd, create the index pages
View Full Code Here

Examples of org.apache.maven.jxr.pacman.PackageManager

    public void xref(List sourceDirs, String templateDir, String windowTitle, String docTitle, String bottom)
        throws IOException, JxrException
    {
        FileManager fileManager = new FileManager();
        fileManager.setEncoding(inputEncoding);
        PackageManager pkgmgr = new PackageManager(log, fileManager);
        pkgmgr.setExcludes(excludes);
        pkgmgr.setIncludes(includes);
        String path;
        for(Iterator i = sourceDirs.iterator(); i.hasNext(); processPath(pkgmgr, path))
        {
            path = (String)i.next();
            path = (new File(path)).getCanonicalPath();
            pkgmgr.process(path);
        }

        DirectoryIndexer indexer = new DirectoryIndexer(pkgmgr, dest);
        indexer.setOutputEncoding(outputEncoding);
        indexer.setTemplateDir(templateDir);
View Full Code Here

Examples of org.apache.maven.jxr.pacman.PackageManager

    {
        // first collect package and class info
        FileManager fileManager = new FileManager();
        fileManager.setEncoding( inputEncoding );

        PackageManager pkgmgr = new PackageManager( log, fileManager );
        pkgmgr.setExcludes( excludes );
        pkgmgr.setIncludes( includes );

        // go through each source directory and xref the java files
        for ( Iterator i = sourceDirs.iterator(); i.hasNext(); )
        {
            String path = (String) i.next();
            path = new File( path ).getCanonicalPath();

            pkgmgr.process( path );

            processPath( pkgmgr, path );
        }

        // once we have all the source files xref'd, create the index pages
View Full Code Here

Examples of org.apache.maven.jxr.pacman.PackageManager

    protected void setUp()
        throws Exception
    {
        super.setUp();
        packageManager = new PackageManager( new DummyLog(), new FileManager() );
        codeTransform = new JavaCodeTransform( packageManager );
    }
View Full Code Here

Examples of org.codehaus.loom.components.extensions.pkgmgr.PackageManager

    public void compose( final ResourceLocator locator )
        throws MissingResourceException
    {
        final ExtensionManager extensionManager = (ExtensionManager) locator.lookup(
            ExtensionManager.class.getName() );
        m_packageManager = new PackageManager( extensionManager );
        m_commonClassLoader = (ClassLoader) locator.lookup(
            ClassLoader.class.getName() + "/common" );
    }
View Full Code Here

Examples of org.jboss.ejb3.packagemanager.PackageManager

    * @param jbossHome
    * @return
    */
   public static PackageManager createNewInstance(PackageManagerEnvironment environment, String jbossHome)
   {
      PackageManager packageManager = new TransactionalPackageManager(environment, jbossHome);
      ClassLoader cl = Thread.currentThread().getContextClassLoader();
      InvocationHandler invocationHandler = new TransactionalPackageManagerInvocationHandler(packageManager);
      return (PackageManager) Proxy.newProxyInstance(cl, new Class[]
      {PackageManager.class}, invocationHandler);
   }
View Full Code Here

Examples of org.jboss.ejb3.packagemanager.PackageManager

         throw new PackageManagerException("JBoss home " + jbHome + " does not exist!");
      }
      logger.info("Using JBoss Home: " + jbossHome);
     
      // Create a package manager now
      PackageManager pm = PackageManagerFactory.getDefaultPackageManager(env, jbossHome);

      // Parse the options from the command line and do appropriate action(s)
      Boolean query = (Boolean) cmdLineParser.getOptionValue(queryCmdOption, Boolean.FALSE);
      String packageToInstall = (String) cmdLineParser.getOptionValue(installCmdOption);
      String packageToUpgrade = (String) cmdLineParser.getOptionValue(upgradeCmdOption);
      String packageToRemove = (String) cmdLineParser.getOptionValue(removeCmdOption);
     
      if (query)
      {
         Set<String> installedPackages = pm.getAllInstalledPackages();
         if (installedPackages.isEmpty())
         {
            logger.info("There are no packages installed in the system");
         }
         else
         {
            logger.info("Following packages have been installed in the system: ");
            logger.info("----------------------------------------------------");
            for (String packageName : installedPackages)
            {
               logger.info(packageName);
            }
            logger.info("----------------------------------------------------");
         }
      }

      if (packageToInstall != null)
      {
         // it's time to install
         pm.installPackage(packageToInstall);

      }

      if (packageToUpgrade != null)
      {
         // upgrade!
         pm.updatePackage(packageToUpgrade);
      }

      if (packageToRemove != null)
      {
         // out you go!
         pm.removePackage(packageToRemove);
      }
     
   }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.