public PermissionsI() { Long l = (Long) Utils .internalForm(ome.model.internal.Permissions.EMPTY); if (l == null) { throw new IllegalStateException("Permissions.DEFAULT is null"); } this.perm1 = l.longValue(); }
public PermissionsI(String representation) { Long l = (Long) Utils.internalForm(ome.model.internal.Permissions .parseString(representation)); if (l == null) { throw new IllegalStateException(representation + " produced null"); } this.perm1 = l.longValue(); }
public PermissionsI(ome.model.internal.Permissions sourceP) { setPerm1((Long) ome.util.Utils.internalForm(sourceP)); this.restrictions = sourceP.getRestrictions(); String[] extRestr = sourceP.copyExtendedRestrictions(); this.extendedRestrictions = extRestr == null ? null : Arrays.<String>asList(extRestr); }
private void handleGroupChange(IObject obj, Permissions newPerms) { final ExperimenterGroup group = load(obj); if (newPerms == null) { throw new ApiUsageException("PERMS cannot be null"); } final Permissions oldPerms = group.getDetails().getPermissions(); if (oldPerms.sameRights(newPerms)) { log.debug(String.format("Ignoring unchanged permissions: %s", newPerms)); return; } final Long internal = (Long) Utils.internalForm(newPerms); sql.changeGroupPermissions(obj.getId(), internal); log.info(String.format("Changed permissions for %s to %s", obj.getId(), internal)); eventlog(obj.getId(), newPerms.toString()); }
perm1 = (Long) Utils.internalForm(Permissions.parseString(permissions)); } catch (RuntimeException e) { throw helper.cancel(new ERR(), e, "bad-permissions");
public long setStatsInfo(Channel ch, StatsInfo si) { final Details d = ch.getDetails(); final long id = nextValue("seq_statsinfo", 1); _jdbc().update(_lookup("stats_info_creation"), //$NON-NLS-1$ id, Utils.internalForm(d.getPermissions()), si.getGlobalMax(), si.getGlobalMin(), d.getCreationEvent().getId(), d.getGroup().getId(), d.getOwner().getId(), d.getUpdateEvent().getId()); _jdbc().update(_lookup("stats_info_set_on_channel"), //$NON-NLS-1$ id, ch.getId()); return id; }