Package org.nuxeo.ecm.directory.api

Examples of org.nuxeo.ecm.directory.api.DirectoryService


            RelationshipKind kind) {
        if (kind == null) {
            throw new ClientRuntimeException("Type cannot be null");
        }

        DirectoryService directoryService = Framework.getLocalService(DirectoryService.class);
        Session relationshipsDirectory = null;
        try {
            relationshipsDirectory = directoryService.open(RELATIONSHIP_DIRECTORY_NAME);
            // try to get an existing entry
            Map<String, Serializable> relationship = new HashMap<String, Serializable>();
            relationship.put(RELATIONSHIP_FIELD_ACTOR, actorId);
            relationship.put(RELATIONSHIP_FIELD_TARGET, targetId);
            relationship.put(RELATIONSHIP_FIELD_KIND, kind.toString());
View Full Code Here


    }

    @Override
    public Boolean removeRelation(String actorId, String targetId,
            RelationshipKind kind) {
        DirectoryService directoryService = Framework.getLocalService(DirectoryService.class);
        Session relationshipDirectory = null;
        try {
            relationshipDirectory = directoryService.open(RELATIONSHIP_DIRECTORY_NAME);

            Map<String, Serializable> filter = new HashMap<String, Serializable>();
            filter.put(RELATIONSHIP_FIELD_ACTOR, actorId);
            if (!StringUtils.isBlank(targetId)) {
                filter.put(RELATIONSHIP_FIELD_TARGET, targetId);
View Full Code Here

        }
    }

    protected DocumentModelList queryRelationshipsDirectory(
            Map<String, Serializable> filter, Boolean withFulltext) {
        DirectoryService directoryService = Framework.getLocalService(DirectoryService.class);
        Session relationshipsDirectory = null;
        try {
            relationshipsDirectory = directoryService.open(RELATIONSHIP_DIRECTORY_NAME);

            Set<String> fulltextFields = new HashSet<String>();
            fulltextFields.add(RELATIONSHIP_FIELD_KIND);
            if (withFulltext) {
                fulltextFields.addAll(filter.keySet());
View Full Code Here

TOP

Related Classes of org.nuxeo.ecm.directory.api.DirectoryService

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.