@Override public String generateRepoUuid() { return this.helper.getUuid(); }
public ScriptRepositoryI(ObjectAdapter oa, Registry reg, Executor ex, Principal p, ScriptRepoHelper helper, ReadOnlyStatus readOnly, PublicRepositoryI servant, Set<String> scriptRepoUuids) { super(oa, reg, ex, p, helper.getScriptDir(), readOnly, servant); this.helper = helper; scriptRepoUuids.add(helper.getUuid()); }
public RepositoryPrx getScriptRepository(Current __current) throws ServerError { InternalRepositoryPrx[] repos = registry.lookupRepositories(); InternalRepositoryPrx prx = null; if (repos != null) { for (int i = 0; i < repos.length; i++) { if (repos[i] != null) { if (repos[i].toString().contains(helper.getUuid())) { prx = repos[i]; } } } } return prx == null ? null : prx.getProxy(); }
@Transactional(readOnly = true) public Boolean doWork(Session session, ServiceFactory sf) { final OriginalFile file = new OriginalFile(); if (isIntoUserGroup) { final long userGroupId = sf.getAdminService().getSecurityRoles().getUserGroupId(); file.getDetails().setGroup((ome.model.meta.ExperimenterGroup) session.get(ome.model.meta.ExperimenterGroup.class, userGroupId)); } file.setRepo(scripts.getUuid()); /* check with interceptor */ try { interceptor.newTransientDetails(file); } catch (ome.conditions.SecurityViolation sv) { return false; } /* check with ACL voter */ file.setRepo(null); // can never create with repo set return aclVoter.allowCreation(file); } });