public static void grantAccessToProject(ServiceExecutor executor, String id, String project) throws Throwable { if (project == null) { return; } XmlDocMaker dm = new XmlDocMaker("args"); dm.add("type", "role"); dm.add("name", Project.subjectAdministratorRoleName(project)); dm.add("role", new String[] {"type", "role"}, Role.rSubjectGuestRoleName()); executor.execute("actor.grant", dm.root()); }
public void execute(XmlDoc.Element args, Inputs in, Outputs out, XmlWriter w) throws Throwable { /* * get the cid argument value */ String id = args.value("cid"); /* * build the args for om.pssd.object.describe service. */ XmlDocMaker dm = new XmlDocMaker("args"); dm.add("id", id); /* * call om.pssd.object.describe service. */ XmlDoc.Element r = executor().execute("om.pssd.object.describe", dm.root()); /* * return the result. */ w.add(r.element("object")); }