Package net.rim.tumbler.file

Examples of net.rim.tumbler.file.Library$Extension


        System.out.println("Plugin key: " + keyStr +
            " is used. Please try with a new key.");
      }
      else
      {
        Extension ext = createExtensionObject(props);
        extMgr.registerExtension(ext);
        System.out.println("Plugin: " + keyStr +
            " has been successfully registered.");
      }
    }
    else if ("update".equalsIgnoreCase(operation))
    {
      if(extMgr.findExtension(keyStr)!=null)
      {
        Extension ext = createExtensionObject(props);
        extMgr.updateExtension(ext);
        System.out.println("Plugin: " + keyStr +
            " has been successfully updated.");
      }
      else
View Full Code Here


    eci.setUrl(extUrl);
    eci.setType("com.vmware.vim.viClientScripts");
    eci.setVersion(version);
    eci.setDescription(description);

    Extension ext = new Extension();
    ext.setServer(new ExtensionServerInfo[]{esi});
    ext.setClient(new ExtensionClientInfo[] {eci});
    ext.setDescription(description);
    ext.setKey(keyStr);
    ext.setVersion(version);
    ext.setLastHeartbeatTime(Calendar.getInstance());

    return ext;
  }
View Full Code Here

     
      _extensionJSFiles.addAll(getJSRelativePaths(_curPaths));
     
      // extension can be found in lookup table for sure, otherwise
      // exception would have been thrown in ExtensionDependencyManager.resolve
      Library lib = _extensionLookupTable.get(extensionId).getLibrary();
      _extensionClasses.add(lib.getEntryClass());
    }
  }
View Full Code Here

   *         <configuration>, <platform> or <src> is not specified correctly
   * @throws Exception
   */
  private Hashtable<String, ExtensionInfo> parseFeaturesInLibraryXML(
      File libraryXML, boolean allowBackwardCompatibility) throws Exception {
    Library lib = parseLibraryXML(libraryXML);
   
    if (lib == null) {
      return null;
    }   
   
    ArrayList<WidgetFeature> features = lib.getFeatures();
    HashSet<String> javaPaths = new HashSet<String>();
    HashSet<String> jsPaths = new HashSet<String>();
    Hashtable<String, ExtensionInfo> availableFeatures = new Hashtable<String, ExtensionInfo>();   
   
    if (allowBackwardCompatibility) {
      // have to work for library.xml that doesn't contain configuration and platform elements
      File[] files = _temporaryDirectory.listFiles();
     
      for (File f : files) {
        javaPaths.add(f.getAbsolutePath());
      }       
    } else {
      ExtensionInfo info = new ExtensionInfo(lib, javaPaths, jsPaths);
      boolean extensionIdFound = false;
     
      if (lib.getExtension() != null) {
        Extension extension = lib.getExtension();
        String id = extension.getId();

        if (id != null && !id.isEmpty()) {
          if (_extensionLookupTable.contains(id)) {
            // more than one library.xml contain the same extension id
            Logger.logMessage(LogType.WARNING,
                "VALIDATION_EXTENSION_DEFINED_MORE_THAN_ONCE",
                new String[] { id });
          }
             
          _extensionLookupTable.put(id, info);
         
          info.setExtensionFolder(libraryXML.getParentFile());
         
          extensionIdFound = true;
        }
      }
     
      if (!extensionIdFound) {
        // not considered an error, this extension might not be used
        // by the app being compiled
        Logger.logMessage(LogType.WARNING,
            "VALIDATION_LIBRARYXML_EXTENSION_ID_NOT_DEFINED",
            new String[] { libraryXML.getAbsolutePath() });
      }     
     
      Configuration config = getTargetConfiguration(lib);
     
      if (config == null) {
                Logger.logMessage(LogType.WARNING, "VALIDATION_LIBRARYXML_NO_CONFIG",
                        new String[] { libraryXML.getAbsolutePath() });
                return null;
      }

      ArrayList<Src> src = config.getSrc();

      if (src == null || src.isEmpty()) {
                Logger.logMessage(LogType.WARNING, "VALIDATION_LIBRARYXML_NO_SRC",
                    new String[] { libraryXML.getAbsolutePath() });
                return null;
      }

      File extensionDir = libraryXML.getParentFile();

      for (Src s : src) {
        String path = s.getPath();
       
        if (s.getType().equalsIgnoreCase("text/java")) {
          javaPaths.add(extensionDir.getAbsolutePath() + File.separator
              + path);
        } else if (s.getType().equalsIgnoreCase("text/javascript")) {
          jsPaths.add(extensionDir.getAbsolutePath() + File.separator
              + path);
        }
      }
    }

    ExtensionInfo info = new ExtensionInfo(lib, javaPaths, jsPaths);
   
    for (WidgetFeature feature : features) {
      availableFeatures.put(feature.getID(), info);
    }
   
    if (lib.getCompiledJARDependencies() != null) {
      for (Jar j : lib.getCompiledJARDependencies()) {
        String path = j.getPath();
        File temp = new File(path);
       
        if (temp.isAbsolute()) {
          info.addCompiledJARPath(path);
View Full Code Here

  private static final String ATTR_REQUIRED = "required";
 
  private Library _library = null;

  public LibraryXMLParser() {
    _library = new Library();
  }
View Full Code Here

        boolean[] issuerUniqueID  = new boolean[]
                    {true, false, true, false, true, false, true, false};
        boolean[] subjectUniqueID = new boolean[]
                    {false, true, false, true, false, true, false, true};

        Extension extension = new Extension("2.5.29.17",
                                            true, subjectAltNames.getEncoded());
        Extensions extensions = new Extensions();
        extensions.addExtension(extension);
      
        TBSCertificate tbsCertificate = new TBSCertificate(version,
View Full Code Here

     */
    public byte[] getExtensionValue(String oid) {
        if (extensions == null) {
            return null;
        }
        Extension ext = extensions.getExtensionByOID(oid);
        return (ext == null) ? null : ext.getRawExtnValue();
    }
View Full Code Here

    public byte[] getExtensionValue(String oid) {
        if (extensions == null) {
            return null;
        }
        // retrieve the info from the cached extensions object
        Extension ext = extensions.getExtensionByOID(oid);
        return (ext == null) ? null : ext.getRawExtnValue();
    }
View Full Code Here

            new GeneralName(6, "http://Resource.Id"),
            new GeneralName(new byte[] {1, 1, 1, 1}),
            new GeneralName(8, "1.2.3.4444.55555")
        };
        GeneralNames sans = new GeneralNames(Arrays.asList(san));
        Extension extension = new Extension("2.5.29.17", true, sans.getEncoded());
        Extensions extensions = new Extensions();
        extensions.addExtension(extension);
       
        byte[] encoding = extensions.getEncoded();
        Extensions.ASN1.decode(encoding);
View Full Code Here

        // crl entry extensions
        Extensions crlEntryExtensions = new Extensions();
        // add reason code extension which OID is 2.5.29.21
        // see RFC 3280 http://www.ietf.org/rfc/rfc3280.txt
        crlEntryExtensions.addExtension(
                new Extension("2.5.29.21", Extension.NON_CRITICAL,
                    new ReasonCode(ReasonCode.KEY_COMPROMISE)));
        // crl entry
        X509CRLEntryImpl crlEntry = new X509CRLEntryImpl(
                new TBSCertList.RevokedCertificate(
                        serialNumber,
View Full Code Here

TOP

Related Classes of net.rim.tumbler.file.Library$Extension

Copyright © 2018 www.massapicom. 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.