Examples of AllowableActions


Examples of org.apache.chemistry.opencmis.commons.data.AllowableActions

                    f = createResult(FAILURE, "Non-Fileable object has CAN_MOVE_OBJECT allowable action!");
                    addResult(results, assertNotAllowableAction(object, Action.CAN_MOVE_OBJECT, null, f));
                }

                // get allowable actions again
                AllowableActions allowableActions = session.getBinding().getObjectService()
                        .getAllowableActions(session.getRepositoryInfo().getId(), object.getId(), null);

                if (allowableActions.getAllowableActions() == null) {
                    addResult(results,
                            createResult(FAILURE, "getAllowableActions() didn't returned allowable actions!"));
                } else {
                    f = createResult(FAILURE,
                            "Object allowable actions don't match the allowable actions returned by getAllowableActions()!");
                    addResult(
                            results,
                            assertEqualSet(object.getAllowableActions().getAllowableActions(),
                                    allowableActions.getAllowableActions(), null, f));
                }
            }

            // check ACL
            if (object.getAcl() != null && object.getAcl().getAces() != null) {
View Full Code Here

Examples of org.apache.chemistry.opencmis.commons.data.AllowableActions

        return (result.getStatus().getLevel() <= OK.getLevel() ? null : result);
    }

    protected CmisTestResult assertAllowableAction(CmisObject object, Action action, CmisTestResult success,
            CmisTestResult failure) {
        AllowableActions allowableActions = object.getAllowableActions();
        if (allowableActions != null && allowableActions.getAllowableActions() != null) {
            if (allowableActions.getAllowableActions().contains(action)) {
                return success;
            }
        }

        return failure;
View Full Code Here

Examples of org.apache.chemistry.opencmis.commons.data.AllowableActions

        return failure;
    }

    protected CmisTestResult assertNotAllowableAction(CmisObject object, Action action, CmisTestResult success,
            CmisTestResult failure) {
        AllowableActions allowableActions = object.getAllowableActions();
        if (allowableActions != null && allowableActions.getAllowableActions() != null) {
            if (!allowableActions.getAllowableActions().contains(action)) {
                return success;
            }
        }

        return failure;
View Full Code Here

Examples of org.apache.chemistry.opencmis.commons.data.AllowableActions

    // TODO Auto-generated method stub
    return null;
  }

  public AllowableActions getAllowableActions(String user) {
    AllowableActions actions = DataObjectCreator.fillAllowableActions(this, user);
    return actions;
  }
View Full Code Here

Examples of org.apache.chemistry.opencmis.commons.data.AllowableActions

        List<String> requestedIds = FilterParser.getRequestedIdsFromFilter(filter);
        Properties props = getPropertiesFromObject(so, typeDef, requestedIds, true);

        // fill output object
        if (null != includeAllowableActions && includeAllowableActions) {
          AllowableActions allowableActions = so.getAllowableActions(user);
            od.setAllowableActions(allowableActions);
        }
       
        if (null != includeACL && includeACL) {
            od.setAcl(so.getAcl());
View Full Code Here

Examples of org.apache.chemistry.opencmis.commons.data.AllowableActions

        Properties props = getPropertiesFromObject(so, typeDef, requestedProperties, requestedFuncs);

        // fill output object
        if (null != includeAllowableActions && includeAllowableActions) {
           //     AllowableActions allowableActions = DataObjectCreator.fillAllowableActions(so, user);
          AllowableActions allowableActions = so.getAllowableActions(user);
            od.setAllowableActions(allowableActions);
        }

        od.setAcl(so.getAcl());
        od.setIsExactAcl(true);
View Full Code Here

Examples of org.apache.chemistry.opencmis.commons.data.AllowableActions

            throw new CmisObjectNotFoundException("Unknown object id: " + objectId);
        }

        String user = context.getUsername();
//      AllowableActions allowableActions = DataObjectCreator.fillAllowableActions(so, user);
        AllowableActions allowableActions = so.getAllowableActions(user);
        LOG.debug("stop getAllowableActions()");
        return allowableActions;
    }
View Full Code Here

Examples of org.apache.chemistry.opencmis.commons.data.AllowableActions

       
        parent.setRelationships(DataObjectCreator.getRelationships(includeRelationships, parentFolder, user));
       
        if (includeAllowableActions != null && includeAllowableActions) {
            //  AllowableActions allowableActions = DataObjectCreator.fillAllowableActions(spo, user);
            AllowableActions allowableActions = parentFolder.getAllowableActions(user);
            parent.setAllowableActions(allowableActions);
          }
       
        if (objectInfos != null) {
            ObjectInfoImpl objectInfo = new ObjectInfoImpl();
View Full Code Here

Examples of org.apache.chemistry.opencmis.commons.data.AllowableActions

        Set<Action> actions = res.getAllowableActions().getAllowableActions();
        assertNotNull(actions);
        verifyAllowableActionsDocument(actions, false, withContent);

        // get allowable actions via getAllowableActions
        AllowableActions allowableActions = fObjSvc.getAllowableActions(fRepositoryId, id, null);
        assertNotNull(allowableActions);
        actions = allowableActions.getAllowableActions();
        assertNotNull(actions);
        verifyAllowableActionsDocument(actions, false, withContent);

        // cleanup
        fObjSvc.deleteObject(fRepositoryId, id, true, null);
View Full Code Here

Examples of org.apache.chemistry.opencmis.commons.data.AllowableActions

    public boolean hasAllowableAction(Action action) {
        if (action == null) {
            throw new IllegalArgumentException("Action must be set!");
        }

        AllowableActions currentAllowableActions = getAllowableActions();
        if (currentAllowableActions == null || currentAllowableActions.getAllowableActions() == null) {
            throw new IllegalStateException("Allowable Actions are not available!");
        }

        return currentAllowableActions.getAllowableActions().contains(action);
    }
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.