Examples of Manifest


Examples of org.apache.tools.ant.taskdefs.Manifest

      throw new BuildException("the template file attribute is required"
                               +" when mode is \"" +mode.getValue() +"\"");
    }


    Manifest manifestProps = new Manifest();
    if (!mode.getValue().equals("templateOnly")) {
      addAttributesFromProperties(manifestProps);
    }

    Manifest manifestToWrite  = Manifest.getDefaultManifest();
    Manifest manifestTemplate = null;

    if (null!=manifestTemplateFile && manifestTemplateFile.exists()) {
      FileInputStream   is = null;
      InputStreamReader ir = null;
      try {
        is = new FileInputStream(manifestTemplateFile);
        if (encoding == null) {
          ir = new InputStreamReader(is, "UTF-8");
        } else {
          ir = new InputStreamReader(is, encoding);
        }
        manifestTemplate = new Manifest(ir);
      } catch (ManifestException me) {
        throw new BuildException("Template manifest " + manifestTemplateFile
                                 + " is invalid", me, getLocation());
      } catch (IOException ioe) {
        throw new BuildException("Failed to read " + manifestTemplateFile,
View Full Code Here

Examples of org.apache.whirr.service.puppet.Manifest

      for (@SuppressWarnings("unchecked")
      Iterator<String> it = config.getKeys(manifestAttribPrefix); it.hasNext();) {
        String key = it.next();
        manifestProps.setProperty(key, config.getProperty(key));
      }
      Manifest roleManifest = getManifestForClusterSpecAndRole(role, manifestProps);
      if (isHiera) {
        sitePp.add("include " + roleManifest.getName());
        confHiera.add(roleManifest.getHiera());
      } else {
        sitePp.add(roleManifest.toString());
      }
    }
    sitePp.add("}");

    if (isHiera) {
View Full Code Here

Examples of org.apache.xml.security.signature.Manifest

    */
   public static Element createObject4(XMLSignature sig) throws Exception {

      Document doc = sig.getElement().getOwnerDocument();
      String BaseURI = sig.getBaseURI();
      Manifest manifest = new Manifest(doc);
      manifest.addResourceResolver(new OfflineResolver());

      manifest.setId("manifest-1");
      manifest.addDocument(BaseURI, "http://www.w3.org/TR/xml-stylesheet",
                           null, Constants.ALGO_ID_DIGEST_SHA1,
                           "manifest-reference-1", null);
      manifest.addDocument(BaseURI, "#reference-1", null,
                           Constants.ALGO_ID_DIGEST_SHA1, null,
                           "http://www.w3.org/2000/09/xmldsig#Reference");

      //J-
      String xslt = ""
      + "<xsl:stylesheet xmlns:xsl='http://www.w3.org/1999/XSL/Transform'\n"
      + "                xmlns='http://www.w3.org/TR/xhtml1/strict' \n"
      + "                exclude-result-prefixes='foo' \n"
      + "                version='1.0'>\n"
      + "  <xsl:output encoding='UTF-8' \n"
      + "              indent='no' \n"
      + "              method='xml' />\n"
      + "  <xsl:template match='/'>\n"
      + "    <html>\n"
      + "      <head>\n"
      + "        <title>Notaries</title>\n"
      + "      </head>\n"
      + "      <body>\n"
      + "        <table>\n"
      + "          <xsl:for-each select='Notaries/Notary'>\n"
      + "            <tr>\n"
      + "              <th>\n"
      + "                <xsl:value-of select='@name' />\n"
      + "              </th>\n"
      + "            </tr>\n"
      + "          </xsl:for-each>\n"
      + "        </table>\n"
      + "      </body>\n"
      + "    </html>\n"
      + "  </xsl:template>\n"
      + "</xsl:stylesheet>\n"
      ;
      //J+
      javax.xml.parsers.DocumentBuilderFactory dbf =
         javax.xml.parsers.DocumentBuilderFactory.newInstance();

      dbf.setNamespaceAware(true);

      javax.xml.parsers.DocumentBuilder db = dbf.newDocumentBuilder();
      org.w3c.dom.Document docxslt =
         db.parse(new ByteArrayInputStream(xslt.getBytes()));
      Node xslElem = docxslt.getDocumentElement();
      Node xslElemImported = doc.importNode(xslElem, true);
      Transforms transforms = new Transforms(doc);

      transforms.addTransform(Transforms.TRANSFORM_XSLT,
                              (Element) xslElemImported);
      manifest.addDocument(BaseURI, "#notaries", transforms,
                           Constants.ALGO_ID_DIGEST_SHA1, null, null);

      return manifest.getElement();
   }
View Full Code Here

Examples of org.boris.pecoff4j.resources.Manifest

        return sp;
    }

    public static Manifest readManifest(IDataReader dr, int length)
            throws IOException {
        Manifest mf = new Manifest();
        mf.set(dr.readUtf(length));
        return mf;
    }
View Full Code Here

Examples of org.codehaus.plexus.archiver.jar.Manifest

    /**
     * Create a manifest
     */
    private void createManifest(final java.util.jar.Manifest manifest) throws MojoExecutionException {
        // create a new manifest
        final Manifest outManifest = new Manifest();

        try {
            boolean hasMain = false;

            // copy entries from existing manifest
            if ( manifest != null ) {
                final Map<Object, Object> attrs = manifest.getMainAttributes();
                for(final Map.Entry<Object, Object> entry : attrs.entrySet()) {
                    final String key = entry.getKey().toString();
                    if ( !BuildConstants.ATTRS_EXCLUDES.contains(key)) {
                        final Attribute a = new Attribute(key, entry.getValue().toString());
                        outManifest.addConfiguredAttribute(a);
                    }
                    if ( key.equals(BuildConstants.ATTR_MAIN_CLASS) ) {
                        hasMain = true;
                    }
                }
            }
            outManifest.addConfiguredAttribute(new Attribute(BuildConstants.ATTR_IMPLEMENTATION_BUILD,
                            project.getVersion()));
            outManifest.addConfiguredAttribute(new Attribute(BuildConstants.ATTR_IMPLEMENTATION_VERSION,
                            project.getVersion()));

            String organizationName = project.getOrganization() != null ? project.getOrganization().getName() : null;
            if ( organizationName != null ) {
                outManifest.addConfiguredAttribute(new Attribute(BuildConstants.ATTR_IMPLEMENTATION_VENDOR,
                            organizationName));
                outManifest.addConfiguredAttribute(new Attribute(BuildConstants.ATTR_CREATED_BY,
                            organizationName));
                outManifest.addConfiguredAttribute(new Attribute(BuildConstants.ATTR_BUILT_BY,
                            organizationName));
                outManifest.addConfiguredAttribute(new Attribute(BuildConstants.ATTR_SPECIFICATION_VENDOR,
                        organizationName));
            }

            outManifest.addConfiguredAttribute(new Attribute(BuildConstants.ATTR_IMPLEMENTATION_VENDOR_ID,
                            project.getGroupId()));
            outManifest.addConfiguredAttribute(new Attribute(BuildConstants.ATTR_IMPLEMENTATION_TITLE,
                            project.getName()));
            outManifest.addConfiguredAttribute(new Attribute(BuildConstants.ATTR_SPECIFICATION_TITLE,
                            project.getName()));
            outManifest.addConfiguredAttribute(new Attribute(BuildConstants.ATTR_SPECIFICATION_VERSION,
                            project.getVersion()));

            if ( archiver.getDestFile().getName().endsWith(".jar") && !hasMain) {
                outManifest.addConfiguredAttribute(new Attribute(BuildConstants.ATTR_MAIN_CLASS,
                                BuildConstants.ATTR_VALUE_MAIN_CLASS));
            }

            archiver.addConfiguredManifest(outManifest);
        } catch (final ManifestException e) {
View Full Code Here

Examples of org.eclipse.orion.server.cf.objects.Manifest

          IStatus status = parseManifestCommand.doIt();
          if (!status.isOK())
            return status;

          ManifestParseTree manifest = parseManifestCommand.getManifest();
          Manifest resp = new Manifest(manifest);

          return new ServerStatus(Status.OK_STATUS, HttpServletResponse.SC_OK, resp.toJSON());

        } catch (Exception e) {
          String msg = NLS.bind("Failed to handle request for {0}", path); //$NON-NLS-1$
          ServerStatus status = new ServerStatus(IStatus.ERROR, HttpServletResponse.SC_INTERNAL_SERVER_ERROR, msg, e);
          logger.error(msg, e);
View Full Code Here

Examples of org.gradle.api.java.archives.Manifest

            uni.setIncludeEmptyDirs(false);
            uni.setManifest(new Closure<Object>(project)
            {
                public Object call()
                {
                    Manifest mani = (Manifest) getDelegate();
                    mani.getAttributes().put("Main-Class", delayedString("{MAIN_CLASS}").call());
                    mani.getAttributes().put("TweakClass", delayedString("{FML_TWEAK_CLASS}").call());
                    mani.getAttributes().put("Class-Path", getServerClassPath(delayedFile(JSON_REL).call()));
                    return null;
                }
            });
            uni.doLast(new Action<Task>()
            {
View Full Code Here

Examples of org.openoffice.idesupport.xml.Manifest

        throws IOException {

        ZipInputStream documentStream = null;
        ZipInputStream parcelStream = null;
        ZipOutputStream outStream = null;
        Manifest manifest;
       
        String language = getParcelLanguage(parcel);

        if (isDocumentOverwriteNeeded(parcel, targetDocument)) {
            String parcelName = language + "/" +
View Full Code Here

Examples of org.switchyard.component.common.knowledge.annotation.Manifest

     */
    protected ManifestModel toManifestModel(Manifest[] manifestAnnotations, KnowledgeNamespace knowledgeNamespace) {
        if (manifestAnnotations == null || manifestAnnotations.length == 0) {
            return null;
        }
        Manifest manifestAnnotation = manifestAnnotations[0];
        ManifestModel manifestModel = new V1ManifestModel(knowledgeNamespace.uri());
        Container[] container = manifestAnnotation.container();
        if (container != null && container.length > 0) {
            manifestModel.setContainer(toContainerModel(container[0], knowledgeNamespace));
        }
        manifestModel.setResources(toResourcesModel(manifestAnnotation.resources(), knowledgeNamespace));
        return manifestModel;
    }
View Full Code Here

Examples of pivot.wtk.Manifest

            }
        });

        pasteTextButton.getButtonPressListeners().add(new ButtonPressListener() {
            public void buttonPressed(Button button) {
                Manifest clipboardContent = Clipboard.getContent();

                if (clipboardContent != null
                    && clipboardContent.containsText()) {
                    try {
                        label.setText(clipboardContent.getText());
                    } catch(IOException exception) {
                        System.err.println(exception);
                    }
                }
            }
        });

        // Images
        imageView.setDragSource(new DragSource() {
            private LocalManifest content = null;

            public boolean beginDrag(Component component, int x, int y) {
                Image image = imageView.getImage();

                if (image != null) {
                    content = new LocalManifest();
                    content.putImage(image);
                }

                return (content != null);
            }

            public void endDrag(Component component, DropAction dropAction) {
                content = null;
            }

            public boolean isNative() {
                return true;
            }

            public LocalManifest getContent() {
                return content;
            }

            public Visual getRepresentation() {
                return null;
            }

            public Point getOffset() {
                return null;
            }

            public int getSupportedDropActions() {
                return DropAction.COPY.getMask();
            }
        });

        imageView.setDropTarget(new DropTarget() {
            public DropAction dragEnter(Component component, Manifest dragContent,
                int supportedDropActions, DropAction userDropAction) {
                DropAction dropAction = null;

                if (dragContent.containsImage()
                    && DropAction.COPY.isSelected(supportedDropActions)) {
                    dropAction = DropAction.COPY;
                }

                return dropAction;
            }

            public void dragExit(Component component) {
            }

            public DropAction dragMove(Component component, Manifest dragContent,
                int supportedDropActions, int x, int y, DropAction userDropAction) {
                return (dragContent.containsImage() ? DropAction.COPY : null);
            }

            public DropAction userDropActionChange(Component component, Manifest dragContent,
                int supportedDropActions, int x, int y, DropAction userDropAction) {
                return (dragContent.containsImage() ? DropAction.COPY : null);
            }

            public DropAction drop(Component component, Manifest dragContent,
                int supportedDropActions, int x, int y, DropAction userDropAction) {
                DropAction dropAction = null;

                if (dragContent.containsImage()) {
                    try {
                        imageView.setImage(dragContent.getImage());
                        dropAction = DropAction.COPY;
                    } catch(IOException exception) {
                        System.err.println(exception);
                    }
                }

                dragExit(component);

                return dropAction;
            }
        });

        copyImageButton.getButtonPressListeners().add(new ButtonPressListener() {
            public void buttonPressed(Button button) {
                Image image = imageView.getImage();
                if (image != null) {
                    LocalManifest clipboardContent = new LocalManifest();
                    clipboardContent.putImage(image);
                    Clipboard.setContent(clipboardContent);
                }
            }
        });

        pasteImageButton.getButtonPressListeners().add(new ButtonPressListener() {
            public void buttonPressed(Button button) {
                Manifest clipboardContent = Clipboard.getContent();

                if (clipboardContent != null
                    && clipboardContent.containsImage()) {
                    try {
                        imageView.setImage(clipboardContent.getImage());
                    } catch(IOException exception) {
                        System.err.println(exception);
                    }
                }
            }
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.