Examples of OperationParameters


Examples of org.nuxeo.ecm.automation.OperationParameters

    public void testSocialProviderOperation() throws Exception {
        OperationContext ctx = new OperationContext(session);
        assertNotNull(ctx);

        OperationChain chain = new OperationChain("fakeChain");
        OperationParameters oParams = new OperationParameters(
                SocialProviderOperation.ID);
        oParams.set("query", "select * from Article where ecm:isProxy = 0");
        oParams.set("contextPath", "/sws2");
        chain.add(oParams);

        DocumentModelList result = (DocumentModelList) service.run(ctx, chain);
        assertEquals(2, result.size());

        // remove current user from admins of sws2
        DocumentModel sws = session.getDocument(new PathRef("/sws2"));
        SocialWorkspace socialWorkspace = toSocialWorkspace(sws);

        oParams.set("query", "select * from Article where ecm:isProxy = 1");
        result = (DocumentModelList) service.run(ctx, chain);
        assertEquals(1, result.size()); // return only the public article
    }
View Full Code Here

Examples of org.nuxeo.ecm.automation.OperationParameters

    public void testOnlyPublicDocumentsParameters() throws Exception {
        OperationContext ctx = new OperationContext(session);
        assertNotNull(ctx);

        OperationChain chain = new OperationChain("fakeChain");
        OperationParameters oParams = new OperationParameters(
                SocialProviderOperation.ID);
        oParams.set("query", "select * from Article");
        oParams.set("contextPath", "/sws2");
        oParams.set("onlyPublicDocuments", "true");
        chain.add(oParams);

        DocumentModelList result = (DocumentModelList) service.run(ctx, chain);
        assertEquals(1, result.size());

        oParams.set("onlyPublicDocuments", "false");
        result = (DocumentModelList) service.run(ctx, chain);
        assertEquals(3, result.size());

        oParams.set("onlyPublicDocuments", "wrong string for a boolean");
        result = (DocumentModelList) service.run(ctx, chain);
        assertEquals(3, result.size());

    }
View Full Code Here

Examples of org.nuxeo.ecm.automation.OperationParameters

        OperationContext ctx = new OperationContext(session);
        assertNotNull(ctx);

        OperationChain chain = new OperationChain("fakeChain");
        OperationParameters oParams = new OperationParameters(
                GetSocialWorkspaceMembers.ID);
        oParams.set("pattern", "testU%");
        oParams.set("page", 0);
        oParams.set("pageSize", 5);
        oParams.set("contextPath", "/testSocialWorkspace");
        chain.add(oParams);

        Blob result = (Blob) automationService.run(ctx, chain);
        JSONObject o = JSONObject.fromObject(result.getString());
        JSONArray array = (JSONArray) o.get("users");
View Full Code Here

Examples of org.rhq.enterprise.gui.operation.model.OperationParameters

            Subject subject = EnterpriseFacesContextUtility.getSubject();
            Integer operationId = FacesContextUtility.getRequiredRequestParameter("opId", Integer.class);
            OperationManagerLocal operationManager = LookupUtil.getOperationManager();

            this.history = operationManager.getOperationHistoryByHistoryId(subject, operationId);
            this.parameters = new OperationParameters(this.history);
            this.results = new OperationResults((ResourceOperationHistory) history);
        }
    }
View Full Code Here

Examples of org.rhq.enterprise.gui.operation.model.OperationParameters

            } catch (Exception e) {
                // capture all known info and throw a RuntimeException
                throw new IllegalStateException(e.getMessage(), e);
            }

            this.parameters = new OperationParameters(this.schedule);

            String jobName = schedule.getJobName();
            String jobGroup = schedule.getJobGroup();
            SimpleTrigger quartzTrigger = null;
View Full Code Here

Examples of org.rhq.enterprise.gui.operation.model.OperationParameters

            OperationManagerLocal operationManager = LookupUtil.getOperationManager();

            this.history = (GroupOperationHistory) operationManager
                .getOperationHistoryByHistoryId(subject, operationId);

            this.parameters = new OperationParameters(this.history);
        }
    }
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.