Examples of PackageType


Examples of com.uic.ase.proj.xbn.jdlcode.PackageType

    @return  <CODE>(new <A HREF="~JD~pt#pt(s,s)~EJD~">PackageType</A>([string1], [string2]))</CODE>
   **/
  public final PackageType getPackageTypeFromLine(String s_cfgFileLine, int i_lineNumber)  {
    s_s ss = get2StringsFromLine(s_cfgFileLine, "getPackageTypeFromLine", i_lineNumber, "package prefix", "external url", false);

    return (new PackageType(ss.s1, ss.s2));
  }
View Full Code Here

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

            for ( int j = 0; j < packages.length; ++j )
            {
                //get the package from the PackageManager because this will hold
                //the version with the classes also.

                PackageType currentImport = packageManager.getPackageType( packages[j] );

                //the package here might in fact be null because it wasn't parsed out
                //this might be something that is either not included or is part
                //of another package and wasn't parsed out.

                if ( currentImport == null )
                {
                    continue;
                }

                //see if the current word is within the package

                //at this point the word could be a fully qualified package name
                //(FQPN) or an imported package name.

                String wordName = word.toString();

                if ( wordName.indexOf( "." ) != -1 )
                {
                    //if there is a "." in the string then we have to assume
                    //it is a package.

                    String fqpn_package = null;
                    String fqpn_class = null;

                    fqpn_package = wordName.substring( 0, wordName.lastIndexOf( "." ) );
                    fqpn_class = wordName.substring( wordName.lastIndexOf( "." ) + 1, wordName.length() );

                    //note. since this is a reference to a full package then
                    //it doesn't have to be explicitly imported so this information
                    //is useless.  Instead just see if it was parsed out.

                    PackageType pt = packageManager.getPackageType( fqpn_package );

                    if ( pt != null )
                    {
                        ClassType ct = pt.getClassType( fqpn_class );

                        if ( ct != null )
                        {
                            //OK.  the user specified a full package to be imported
                            //that is in the package manager so it is time to
                            //link to it.

                            line = xrLine( line, pt.getName(), ct );
                        }
                    }

                    if ( fqpn_package.equals( currentImport.getName() )
                        && currentImport.getClassType( fqpn_class ) != null )
View Full Code Here

Examples of org.exolab.castor.builder.binding.PackageType

    */
    private void processNamespaces(PackageType[] packages) {
        if (packages.length == 0)
            return;
        for (int i=0; i<packages.length; i++) {
            PackageType temp = packages[i];
            PackageTypeChoice choice = temp.getPackageTypeChoice();
            if (choice.getNamespace() != null) {
                setNamespacePackageMapping(choice.getNamespace(), temp.getName());
            }
            else if (choice.getSchemaLocation() != null) {
                //1--Handle relative locations
                String tempLocation = choice.getSchemaLocation();
                String currentDir = System.getProperty("user.dir");
                currentDir = currentDir.replace('\\', '/');
                if (tempLocation.startsWith("./")) {
                    tempLocation = tempLocation.substring(1);
                    tempLocation = currentDir+tempLocation;
                }
                else if (tempLocation.startsWith("../")) {
                     tempLocation = tempLocation.substring(3);
                     int lastDir = currentDir.lastIndexOf('/');
                     currentDir = currentDir.substring(0, lastDir+1);
                     tempLocation = currentDir + tempLocation;
                }
                setLocationPackageMapping(tempLocation, temp.getName());
                currentDir = null;
                tempLocation = null;
            }
        }
    }
View Full Code Here

Examples of org.exolab.castor.builder.binding.xml.PackageType

            _binding.setDefaultBindingType(loaded.getDefaultBindingType());

            //--packages
            Enumeration<PackageType> packages = loaded.enumeratePackage();
            while (packages.hasMoreElements()) {
                PackageType tempPackage = packages.nextElement();
                _binding.addPackage(tempPackage);
            }

            //--NamingXML
            NamingXMLType naming = loaded.getNamingXML();
View Full Code Here

Examples of org.jboss.ejb3.packagemanager.metadata.PackageType

   @Override
   protected void doInstall(InstallFileType fileMetadata, File fileToInstall, File dest) throws PackageManagerException
   {
      // just copy from source to dest
      File destFile = new File(dest, fileMetadata.getName());
      PackageType pkgMeta = fileMetadata.getPackage();
      if (destFile.exists())
      {
         logger.info("File " + fileMetadata.getName() + " from package: " + pkgMeta.getName() + " version: "
               + pkgMeta.getVersion() + " already exists in " + dest + " - installer will overwrite it");
      }
      try
      {
         IOUtil.copy(fileToInstall, destFile);
      }
      catch (IOException e)
      {

         throw new PackageManagerException("Could not install file: " + fileMetadata.getName() + " from package: "
               + pkgMeta.getName() + " version: " + pkgMeta.getVersion() + " into " + dest.getAbsolutePath());
      }

   }
View Full Code Here

Examples of org.ogce.schemas.gfac.documents.PackageType

    if (host.getPortRangeStart() > 0 && host.getPortRangeEnd() > 0) {
      portRangeType.setStart(Integer.valueOf(host.getPortRangeStart()));
      portRangeType.setEnd(Integer.valueOf(host.getPortRangeEnd()));
    }

    PackageType javaInstallation;
    if (hostConf.getJavaArray() != null
        && hostConf.getJavaArray().length > 0) {
      javaInstallation = hostConf.getJavaArray(0);
    } else {
      javaInstallation = hostConf.addNewJava();
    }
    String jdkName = host.getJdkName();
    javaInstallation.setName(jdkName);
    javaInstallation.setHome(host.getJdkPath());
    // FIXME: hostBean should not be needed
    javaInstallation.setVersion(jdkName.replaceAll("java", ""));

    if (host.getHostEnv() != null) {
      HashMap<String, NameValuePairType> envMap = new HashMap<String, NameValuePairType>();
      if (hostConf.getHostEnvArray() != null) {
        for (NameValuePairType pair : hostConf.getHostEnvArray()) {
View Full Code Here

Examples of org.rhq.core.domain.content.PackageType

     */
    public static PackageType parseContentDescriptor(ContentDescriptor descriptor)
        throws InvalidPluginDescriptorException {
        PackageCategory category = translateCategory(descriptor.getCategory());

        PackageType type = new PackageType();
        type.setName(descriptor.getName());
        type.setDescription(descriptor.getDescription());
        type.setCategory(category);
        type.setSupportsArchitecture(descriptor.isSupportsArchitecture());

        String displayName = descriptor.getDisplayName();

        if ((displayName == null) || displayName.equals("")) {
            displayName = StringUtils.deCamelCase(descriptor.getName());
        }

        type.setDisplayName(displayName);

        type.setDiscoveryInterval(descriptor.getDiscoveryInterval());

        type.setCreationData(descriptor.isIsCreationType());

        ConfigurationDescriptor configurationDescriptor = descriptor.getConfiguration();
        ConfigurationDefinition configurationDefinition = ConfigurationMetadataParser.parse(descriptor.getName(),
            configurationDescriptor);
        type.setDeploymentConfigurationDefinition(configurationDefinition);

        return type;
    }
View Full Code Here

Examples of org.rhq.core.domain.content.PackageType

            resourceType1 = new ResourceType("platform-" + System.currentTimeMillis(), "TestPlugin",
                ResourceCategory.PLATFORM, null);
            em.persist(resourceType1);

            // Add package types to resource type
            packageType1 = new PackageType();
            packageType1.setName("package1-" + System.currentTimeMillis());
            packageType1.setDescription("");
            packageType1.setCategory(PackageCategory.DEPLOYABLE);
            packageType1.setDisplayName("TestResourcePackage");
            packageType1.setCreationData(true);
            packageType1.setResourceType(resourceType1);
            em.persist(packageType1);

            packageType2 = new PackageType();
            packageType2.setName("package2-" + System.currentTimeMillis());
            packageType2.setDescription("");
            packageType2.setCategory(PackageCategory.DEPLOYABLE);
            packageType2.setDisplayName("TestResourcePackage2");
            packageType2.setCreationData(true);
            packageType2.setResourceType(resourceType1);
            em.persist(packageType2);

            packageType3 = new PackageType();
            packageType3.setName("package3-" + System.currentTimeMillis());
            packageType3.setDescription("");
            packageType3.setCategory(PackageCategory.DEPLOYABLE);
            packageType3.setDisplayName("TestResourcePackage3");
            packageType3.setCreationData(true);
            packageType3.setResourceType(resourceType1);
            em.persist(packageType3);

            packageType4 = new PackageType();
            packageType4.setName("package4-" + System.currentTimeMillis());
            packageType4.setDescription("");
            packageType4.setCategory(PackageCategory.DEPLOYABLE);
            packageType4.setDisplayName("TestResourcePackage4");
            packageType4.setCreationData(true);
View Full Code Here

Examples of org.rhq.core.domain.content.PackageType

    @Test(enabled = ENABLED)
    public void packageType() throws Exception {
        // Setup
        ResourceType resourceType = null;
        PackageType packageType = null;

        TransactionManager tx = getTransactionManager();
        try {
            tx.begin();
            EntityManager entityManager = getEntityManager();

            resourceType = new ResourceType("dynamicConfigPropBeanTestType", "foo", ResourceCategory.PLATFORM, null);
            entityManager.persist(resourceType);

            packageType = new PackageType("dynamicConfigPropBeanTestType", resourceType);
            entityManager.persist(packageType);
            tx.commit();
        } catch (Exception e) {
            if (tx.getStatus() == Status.STATUS_ACTIVE) {
                tx.rollback();
            }
        }

        int existingPackageTypes = countForQuery(PackageType.QUERY_FIND_ALL);
        assert existingPackageTypes > 0 : "Package type created in setup was not written correctly";

        // Test
        List<DynamicConfigurationPropertyValue> types = bean
            .lookupValues(PropertyExpressionEvaluator.KEY_PACKAGE_TYPES);

        // Verify
        assert types.size() == existingPackageTypes : "Expected: " + existingPackageTypes + ", Found: " + types.size();

        // Clean up
        tx = getTransactionManager();
        try {
            tx.begin();
            EntityManager entityManager = getEntityManager();

            resourceType = entityManager.find(ResourceType.class, resourceType.getId());
            entityManager.remove(resourceType);

            packageType = entityManager.find(PackageType.class, packageType.getId());
            entityManager.remove(packageType);

            tx.commit();
        } catch (Exception e) {
            if (tx.getStatus() == Status.STATUS_ACTIVE) {
View Full Code Here

Examples of org.rhq.core.domain.content.PackageType

            asList("ContentServer4.Content.1", "ContentServer4.Content.2"));
    }

    @Test(groups = { "plugin.metadata", "Content.UpgradePlugin" }, dependsOnMethods = { "upgradeContentPlugin" })
    public void addNewDeploymentConfigurationDefinition() throws Exception {
        PackageType packageType = loadPackageType("ContentServer", "ContentMetadataManagerBeanTestPlugin",
            "ContentServer.Content.1");

        ConfigurationDefinition deploymentConfigDef = packageType.getDeploymentConfigurationDefinition();

        assertNotNull(
            "Failed to create new deployment configuration definition for package type that previously did not have one",
            deploymentConfigDef);
        assertEquals("Expected to find 1 property definition in new deployment configuration definition", 1,
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.