Package edu.indiana.extreme.xbaya.mylead

Examples of edu.indiana.extreme.xbaya.mylead.MyLeadAgentStub


    /**
     * @throws MyLeadException
     */
    public void testDoesUserHaveMyLeadAccount() throws MyLeadException {
        MyLeadAgentStub stub = new MyLeadAgentStub(this.configuration
                .getMyLeadAgentURL(), this.myProxyClient.getProxy());
        boolean result = stub.doesUserHaveMyLeadAccount(this.configuration
                .getMyLeadUser());
        assertEquals(true, result);

        boolean result2 = stub.doesUserHaveMyLeadAccount(FAKE_USER_ID);
        assertEquals(false, result2);
    }
View Full Code Here


    /**
     * @throws MyLeadException
     */
    public void estAddNewUser() throws MyLeadException {
        MyLeadAgentStub stub = new MyLeadAgentStub(this.configuration
                .getMyLeadAgentURL(), this.myProxyClient.getProxy());
        String result = stub.addNewUser(FAKE_USER_ID, FAKE_USER_ID);
        logger.info("result: " + result);
    }
View Full Code Here

    /**
     * @throws MyLeadException
     */
    public void estCreateProject() throws MyLeadException {
        MyLeadAgentStub stub = new MyLeadAgentStub(this.configuration
                .getMyLeadAgentURL(), this.myProxyClient.getProxy());
    try {
        MinimalLEADMetadata projectMetadata = new MinimalLEADMetadata(
                FAKE_USER_ID, "Project1", "Project description");
        projectMetadata.setResourceId("Unknown"); // this is neccesary.

       
        String projectID = stub.createProject(FAKE_USER_ID, projectMetadata
                .toString(), true);

        MinimalLEADMetadata workflowTemplatesMetadata = new MinimalLEADMetadata(
                FAKE_USER_ID, MyLead.WORKFLOW_TEMPLATES_COLLECTION,
                "Workflow templates collection description");
        workflowTemplatesMetadata.setResourceId("Unknown");
        LEADresourceDocument leadResourceDoc;

    leadResourceDoc = LEADresourceDocument.Factory.parse(workflowTemplatesMetadata.toString());

        String workflowTemplatesCollectionID = stub.createCollection(
                FAKE_USER_ID, leadResourceDoc.getLEADresource(), projectID,
                true);
        logger.info("workflowTemplatesCollectionID: "
                + workflowTemplatesCollectionID);
       
View Full Code Here

    /**
     * @throws MyLeadException
     *
     */
    public void testListProjectsInFullFormat() throws MyLeadException, XmlException {
        MyLeadAgentStub stub = new MyLeadAgentStub(this.configuration
                .getMyLeadAgentURL(), this.myProxyClient.getProxy());
        String user = this.configuration.getMyLeadUser();

        int limit = 0;

        ContentFilterType.Enum cFilter = ContentFilterType.FULL_SCHEMA;
      
        ContextQueryRequestDocument reqDoc = ContextQueryRequestDocument.Factory.newInstance();
    ContextQueryRequestType req = reqDoc.addNewContextQueryRequest();
    QueryResultConfigurationType resultConfig = req.addNewQueryResultConfiguration();
    resultConfig.setContentFilter(cFilter);
    resultConfig.setHierarchyFilter(edu.indiana.dde.metadata.catalog.types.HierarchyFilterType.TARGET);
    resultConfig.setCount(limit);
    resultConfig.setOffset(0);
    req.setQueryTarget(QueryTargetDocument.Factory.parse(quryTargetXml).getQueryTarget());
     
    AgentPortType agentStub = stub.createStub(user);
   
    QueryResponseDocument response = agentStub.queryWithContext(reqDoc);
        logger.finest("resultElement: "
                + response.toString());
    }
View Full Code Here

    /**
     * @throws MyLeadException
     *
     */
    public void testListProjects() throws MyLeadException {
        MyLeadAgentStub stub = new MyLeadAgentStub(this.configuration
                .getMyLeadAgentURL(), this.myProxyClient.getProxy());

        ArrayList<MyLeadQueryResultItem> projects = stub
                .listProjects(this.configuration.getMyLeadUser());
        for (MyLeadQueryResultItem project : projects) {
            String projectID = project.getResouceID();
            logger.info("projectID: " + projectID);
            String title = project.getTitle();
View Full Code Here

    /**
     * @throws MyLeadException
     */
    public void testProjectNameToID() throws MyLeadException {
        MyLeadAgentStub stub = new MyLeadAgentStub(this.configuration
                .getMyLeadAgentURL(), this.myProxyClient.getProxy());

        String user = this.configuration.getMyLeadUser();
        String projectName = this.configuration.getMyLeadProject();
        String projectID = stub.projectNameToID(user, projectName);
        logger.info("projectID: " + projectID);
    }
View Full Code Here

TOP

Related Classes of edu.indiana.extreme.xbaya.mylead.MyLeadAgentStub

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.