Package xregistry.context

Examples of xregistry.context.GlobalContext


public class UserAndGroupTest extends AbstractXregistryTestCase {

   
    public void testAddUser() throws Exception{
        GlobalContext globalContext = new GlobalContext(true);
        XregistryImpl registry = new XregistryImpl(globalContext);
       
        String user = "/C=US/O=National Center for Supercomputing Applications/CN=Hemapani Srinath Perera";
        registry.createGroup(user, "group1", "group1");
        registry.createGroup(user, "group2", "group1");
View Full Code Here


    private String regsitryURL = "https://linbox3.extreme.indiana.edu:6666/xregistry?wsdl";
   
    public void testStatelessOperations() throws XregistryException{
       
        ProxyRenewer renewer = new ProxyRenewer("hperea","hperera1234",MyProxy.DEFAULT_PORT,14400,"portal.leadproject.org");
        GlobalContext context = new GlobalContext(true);
        context.setHostcertsKeyFile("/etc/lead/certificates/hostcertkey.pem.hperera");
        //context.setCredential(renewer.renewProxy());
        DocumentRegistryClient client = new DocumentRegistryClient(context,regsitryURL);
        DocData[] data;
        data  = client.findHosts("");
        if(data != null){
View Full Code Here

//    }
   
   
    private GlobalContext createContext(String userName,String passwd) throws XregistryException{
        ProxyRenewer renewer = new ProxyRenewer(userName,passwd,MyProxy.DEFAULT_PORT,14400,"portal.leadproject.org");
        GlobalContext context = new GlobalContext(true);
        context.setCredential(renewer.renewProxy());
        return context;
    }
View Full Code Here

//        TestUtils.printListArray(apps);
//    }
   
   
    public void testAddremoveDocTest() throws Exception{
        GlobalContext context =  new GlobalContext(true);
        DocumentRegistryClient client = new DocumentRegistryClient(context,"http://linbox3.extreme.indiana.edu:6666/xregistry?wsdl");
        //DocumentRegistryClient client = new DocumentRegistryClient(context,"https://tyr14.cs.indiana.edu:6666/xregistry?wsdl");
        String user = "/C=US/O=National Center for Supercomputing Applications/CN=Hemapani Srinath Perera";
        String otherUser = "/C=US/O=National Center for Supercomputing Applications/CN=Suresh Marru";
        //String[] hostList;
View Full Code Here

    /**
     * @param args
     * @throws XregistryException
     */
    public static void main(String[] args) throws Exception {
        GlobalContext globalContext = new GlobalContext(true);
        DocumentRegistryClient client = new DocumentRegistryClient(globalContext,"https://tyr15.cs.indiana.edu:6666/xregistry?wsdl");
        client.registerConcreteWsdl(GfacUtils.readFile("/u/hperera/temp/cwsdls/AdderService.wsdl"), 99999999);
       
       
        System.out.println(Utils.canonicalizeDN("O=LEAD Project,OU=portal.leadprojec t.org,OU=cs.indiana.edu,CN=hperera/Email=hperera@cs.indiana.edu,CN=proxy"));
View Full Code Here


public class AddRemoveFilesTest extends TestCase{
   
    public void testAddRemoveAllDesc() throws Exception{
        GlobalContext globalContext = new GlobalContext(false);
        XregistryImpl mySqlRegistry = new XregistryImpl(globalContext);
//       
        //String user = "/C=US/O=National Center for Supercomputing Applications/CN=Hemapani Srinath Perera";
        String user = "/O=LEAD Project/OU=Indiana University Extreme Lab/OU=linbox1.extreme.indiana.edu/OU=extreme.indiana.edu/CN=sshirasu/Email=sshirasu@cs.indiana.edu";
       
View Full Code Here

   
  }

  public DocumentRegistryClient createRegistryService(String registryURL,
      MyProxyCredentials credential, GSSCredential gssCredential ) throws Exception {
    GlobalContext globalContext = new GlobalContext(true);
    if (credential.getTrustedCertsFile() != null) {
      globalContext.setTrustedCertsFile(credential.getTrustedCertsFile());
    if (credential.getHostcertsKeyFile() != null) {
        globalContext.setHostcertsKeyFile(credential.getHostcertsKeyFile());
      } else if (credential != null) {
          globalContext.setCredential(gssCredential);
        }
    }
    return registryClient = new DocumentRegistryClient(globalContext, registryURL);
  }
View Full Code Here

     * use cases user do not need to see shared documents and therefore we keep the property set by defualt.
     */
    private String userDN;
   
    public DocumentRegistryClient(String registryServiceWsdlUrl) throws XregistryException{
      GlobalContext globalContext = new GlobalContext(true);
       String trustedCA = System.getProperty("ssl.hostcertsKeyFile");
      String hostCert =  System.getProperty("ssl.trustedCertsFile");
    globalContext.setTrustedCertsFile(trustedCA);
    globalContext.setHostcertsKeyFile(hostCert);
      WSIFClient client = Utils.createWSIFClient(globalContext, registryServiceWsdlUrl);
        proxy = (XregistryPortType)client.generateDynamicStub(XregistryPortType.class);
        userDN = globalContext.getUserDN();
        System.out.println("Create Stub for "+ registryServiceWsdlUrl + " using "+ userDN);
    }
View Full Code Here

        cmsvc.startService();
    }
   
    public static void main(String[] args){
        try {
            GlobalContext globalContext;
            if(args.length > 0){
                globalContext = new GlobalContext(false,args[0]);
            }else{
                globalContext = new GlobalContext(false);
            }
            XregistryServer xregistryService = new XregistryServer(globalContext);
            xregistryService.start();
        } catch (XregistryException e) {
            log.caught(e);
View Full Code Here

public class AdminShell extends AbstractShell {
    private Command[] commands;

    public AdminShell(String registryWsdlUrl) throws XregistryException {
        super(new AdminClient(new GlobalContext(true),registryWsdlUrl));
        commands = new Command[] {
                new Command("addG", registryClient, "<groupID> <desciption>") {
                    public String[] handleCommand(ArrayList<String> args)
                            throws XregistryException {
                        ((AdminClient) getClient()).createGroup(args.get(0),args.get(1));
View Full Code Here

TOP

Related Classes of xregistry.context.GlobalContext

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.