Package org.glassfish.api.deployment.archive

Examples of org.glassfish.api.deployment.archive.ReadableArchive.entries()


             * For each cert add an association between the signing alias and
             * the JAR.
             */
            result = developerSignedAppContentEntry(absJARURI);
            Collection<String> aliasesUsedToSignJAR = new ArrayList<String>();
            for (Enumeration<String> entryNames = arch.entries("META-INF/");
                 entryNames.hasMoreElements(); ) {
                final String entryName = entryNames.nextElement();
                final String alias = signatureEntryName(entryName);
                updateURIToAliases(result.getKey(), alias);
            }
View Full Code Here


            for (String entryName : libraries) {
                ReadableArchive subSource = null;
                try {
                    subSource = source.getSubArchive(entryName);
                    for (Enumeration subEntries = subSource.entries();
                                subEntries.hasMoreElements();) {
                        String subEntryName =
                                String.class.cast(subEntries.nextElement());
                        ClientJarMakerUtils.copy(
                                subSource, target, subEntryName);
View Full Code Here

            for (ModuleDescriptor md :
                Application.class.cast(descriptor).getModules()) {
                if (md.getModuleType().equals(XModuleType.EJB)) {
                    ReadableArchive subSource =
                        source.getSubArchive(md.getArchiveUri());
                    for (Enumeration e = subSource.entries();e.hasMoreElements();) {
                        String entryName = String.class.cast(e.nextElement());
                        if (!entryName.endsWith(".class")) {
                            continue;
                        }
                        try {
View Full Code Here

            if (entryName.endsWith(".jar") && ! inLibDirSubdirectory(libDir, entryName)) {
                // explode
                ReadableArchive subSource = null;
                try {
                    subSource = source.getSubArchive(entryName);
                    for (Enumeration subEntries = subSource.entries();subEntries.hasMoreElements();) {
                        String subEntryName = (String) subEntries.nextElement();
                        if(DescriptorConstants.PERSISTENCE_DD_ENTRY.equals(subEntryName)){
                            // If we copy DescriptorConstants.PAR_DD_ENTRY into
                            // *Client.jar then during subsequent app loading time
                            // server will treat that jar as another PU Root and try to load it.
View Full Code Here

     */
    protected static Map<String, ReadableArchive> getProbablePersistenceRoots(ReadableArchive parentArchive, SubArchivePURootScanner subArchivePURootScanner) {
        Map<String, ReadableArchive> probablePersitenceArchives = new HashMap<String, ReadableArchive>();
        ReadableArchive  archiveToScan = subArchivePURootScanner.getSubArchiveToScan(parentArchive);
        if(archiveToScan != null) { // The subarchive exists
            Enumeration<String> entries = archiveToScan.entries();
            String puRootPrefix = subArchivePURootScanner.getPurRootPrefix();
            while(entries.hasMoreElements()) {
                String entry = entries.nextElement();
                if(subArchivePURootScanner.isProbablePuRootJar(entry)) {
                    ReadableArchive puRootArchive = getSubArchive(archiveToScan, entry, false /* expect entry to be present */);
 
View Full Code Here

            target.closeEntry(subTarget);
            String subModulePath = subSource.getURI().getSchemeSpecificPart();
            String parentPath = source.getURI().getSchemeSpecificPart();
            if (subModulePath.startsWith(parentPath)) {
                subModulePath = subModulePath.substring(parentPath.length()+File.separator.length());
                for (Enumeration subEntries = subSource.entries();subEntries.hasMoreElements();) {
                    String anEntry = (String) subEntries.nextElement();
                    entriesAdded.add(subModulePath + "/" + anEntry);
                }
            }
            subSource.close();
View Full Code Here

             * For each cert add an association between the signing alias and
             * the JAR.
             */
            result = developerSignedAppContentEntry(absJARURI);
            Collection<String> aliasesUsedToSignJAR = new ArrayList<String>();
            for (Enumeration<String> entryNames = arch.entries("META-INF/");
                 entryNames.hasMoreElements(); ) {
                final String entryName = entryNames.nextElement();
                final String alias = signatureEntryName(entryName);
                updateURIToAliases(result.getKey(), alias);
            }
View Full Code Here

     */
    protected static Map<String, ReadableArchive> getProbablePersistenceRoots(ReadableArchive parentArchive, SubArchivePURootScanner subArchivePURootScanner) {
        Map<String, ReadableArchive> probablePersitenceArchives = new HashMap<String, ReadableArchive>();
        ReadableArchive  archiveToScan = subArchivePURootScanner.getSubArchiveToScan(parentArchive);
        if(archiveToScan != null) { // The subarchive exists
            Enumeration<String> entries = archiveToScan.entries();
            String puRootPrefix = subArchivePURootScanner.getPurRootPrefix();
            while(entries.hasMoreElements()) {
                String entry = entries.nextElement();
                if(subArchivePURootScanner.isProbablePuRootJar(entry)) {
                    ReadableArchive puRootArchive = getSubArchive(archiveToScan, entry, false /* expect entry to be present */);
 
View Full Code Here

        }

        // now find all the entries we should exclude to copy to the target
        // basically all sub module entries should be excluded
        for (String subModuleEntry : subModuleEntries) {
            Enumeration<String> ee = source.entries(subModuleEntry);
            while (ee.hasMoreElements()) {
                String eeEntryName = ee.nextElement();
                entriesToExclude.add(eeEntryName);
            }
        }
View Full Code Here

                entriesToExclude.add(eeEntryName);
            }
        }

        // now copy the rest of the entries
        Enumeration<String> e = source.entries();
        while (e.hasMoreElements()) {
            String entryName = e.nextElement();
            if (! entriesToExclude.contains(entryName)) {
                InputStream sis = source.getEntry(entryName);
                if (isSigFile(entryName)) {
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.