Package com.sonatype.maven.shell.nexus

Examples of com.sonatype.maven.shell.nexus.NexusClient$Extension


    @Override
    protected NexusClient getClient(final Variables vars) {
        assert vars != null;

        NexusClient client;

        // Close if a client already exists
        try {
            client = super.getClient(vars);
            client.close();
        }
        catch (NexusClient.NotConnectedFailure e) {
            // ignore
        }
View Full Code Here


{
    public Object execute(final CommandContext context) throws Exception {
        assert context != null;
        Variables vars = context.getVariables();

        NexusClient client = getClient(vars);

        return execute(context, client);
    }
View Full Code Here

    }

    protected NexusClient getClient(final Variables vars) {
        assert vars != null;
       
        NexusClient client = vars.get(NexusClient.class);
        if (client == null) {
            throw new NexusClient.NotConnectedFailure();
        }
        return client;
    }
View Full Code Here

        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

        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 com.sonatype.maven.shell.nexus.NexusClient$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.