Examples of AclRole


Examples of com.google.gdata.data.acl.AclRole

          }
        }
      }
      if (foundEntries == false) {
        AclEntry aclEntry = new AclEntry();
        aclEntry.setRole(new AclRole("reader"));
        aclEntry.setScope(scope);
        documentsService.insert(new URL(entry.getAclFeedLink().getHref()), aclEntry);
      }
    } catch (MalformedURLException e) {
      // TODO Auto-generated catch block
View Full Code Here

Examples of com.google.gdata.data.acl.AclRole

  public void addAclRole(DocumentListEntry entry, String user, String role) {
    if (Strings.isValidDomainAccount(user, "gmail.com") || Strings.isValidDomainAccount(user, "casamind.com")) {
      try {
        AclEntry aclEntry = new AclEntry();
        aclEntry.setRole(new AclRole(role));
        aclEntry.setScope(new AclScope(AclScope.Type.USER, user));
        documentsService.insert(new URL(entry.getAclFeedLink().getHref()), aclEntry);
      } catch (MalformedURLException e) {
        // TODO Auto-generated catch block
        e.printStackTrace();
View Full Code Here

Examples of com.google.gdata.data.acl.AclRole

        for (AclEntry entry : feed.getEntries()) {
          printAclEntry(entry);
        }
      }
    } else if (args[1].equals("add") && args.length == 6) {
      AclRole role = new AclRole(args[2]);
      AclScope scope;
      if (args[3].equals("user")) {
        scope = new AclScope(AclScope.Type.USER, args[4]);
      } else if (args[3].equals("domain")) {
        scope = new AclScope(AclScope.Type.DOMAIN, args[4]);
      } else {
        printMessage(COMMAND_HELP_PERMS);
        return;
      }
      printAclEntry(documentList.addAclRole(role, scope, args[5]));
    } else if (args[1].equals("change") && args.length == 6) {
      AclRole role = new AclRole(args[2]);
      AclScope scope;
      if (args[3].equals("user")) {
        scope = new AclScope(AclScope.Type.USER, args[4]);
      } else if (args[3].equals("domain")) {
        scope = new AclScope(AclScope.Type.DOMAIN, args[4]);
View Full Code Here

Examples of com.google.gdata.data.acl.AclRole

      String changeType = parser.getValue("changetype");
      String emailId = parser.getValue("email");

      if ("add".equals(changeType)) {
        AclScope scope = new AclScope(AclScope.Type.USER, emailId);
        AclRole role = new AclRole(parser.getValue("role"));

        // Add a new accessor for this entry
        AclEntry entry = new AclEntry();
        entry.setRole(role);
        entry.setScope(scope);

        System.out.println("Adding user " + emailId + " as " + role.getValue()
            + " to " + feedName + " with id " + entryId + " ...");
        URL feedUrl = FeedUris.getAclFeedUrl(feedName, entryId);
        service.insert(feedUrl, entry);
        System.out.println("...done");

      } else if ("change".equals(changeType)) {
        AclScope scope = new AclScope(AclScope.Type.USER, emailId);
        AclRole role = new AclRole(parser.getValue("role"));

        // Change the role of an accessor for this entry
        AclEntry entry = new AclEntry();
        entry.setRole(role);
        entry.setScope(scope);

        System.out.println("Changing user " + emailId + "'s access to "
            + role.getValue() + " for " + feedName + " with id "
            + entryId + " ...");
        URL feedUrl = FeedUris.getAclFeedUrl(feedName, entryId, emailId);
        service.update(feedUrl, entry);
        System.out.println("...done");
View Full Code Here

Examples of de.innovationgate.wga.common.beans.csconfig.v1.ACLRole

   
        bind(form, SWTBinder.BINDING_STRATEGY_AS_YOU_TYPE);
  }

  private void handleAddACLRole() {
    ACLRole role = new ACLRole();
    role.setName("<role name>");
    role.setDefaultManagerRole(false);
    _aclRolesModel.add(role);
  }
View Full Code Here

Examples of de.innovationgate.wga.common.beans.csconfig.v1.ACLRole

            acl.createUserEntry("*", csConfig.getDefaultAccessLevel());
        }
       
        Iterator roles = csConfig.getRoles().iterator();
        while (roles.hasNext()) {
            ACLRole role = (ACLRole) roles.next();
            _log.info("Adding role '" + role.getName() + "' to ACL");
            acl.createRoleEntry(role.getName());
            if (role.isDefaultManagerRole()) {
                assingRoleToDefaultManager(db, acl, role);
            }
        }
       
    }
View Full Code Here

Examples of de.innovationgate.wga.common.beans.csconfig.v1.ACLRole

        }
       
        // Validate role names
        Iterator<ACLRole> roles = getACLRoles().iterator();
        while (roles.hasNext()) {
            ACLRole role = (ACLRole) roles.next();
            if (!Constants.PATTERN_ROLENAMES.matcher(role.getName()).matches()) {
                errors.add(new ValidationError("Role name '" + role.getName() + "' is invalid. Use only international alphanumeric characters and the symbols -, _, $, #, [ and ]",
                        new String[] { "aclRoles" }));
            }
        }

        if (_csConfig instanceof de.innovationgate.wga.common.beans.csconfig.v2.CSConfig) {
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.