Package omero.model
Class PermissionsI
- java.lang.Object
-
- Ice.ObjectImpl
-
- omero.model.Permissions
-
- omero.model.PermissionsI
-
- All Implemented Interfaces:
Ice.Object
,java.io.Serializable
,java.lang.Cloneable
,ome.model.ModelBased
,_PermissionsOperations
,_PermissionsOperationsNC
public class PermissionsI extends Permissions implements ome.model.ModelBased
Blitz wrapper around thePermissions
class. Currently, the internal representation is made public. (see the ZeroC thread link below), but should not be used by clients.- See Also:
- ticket:685, ZeroC Thread 3084, Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static Ice.ObjectFactory
Factory
-
Fields inherited from class omero.model.Permissions
__ids, extendedRestrictions, perm1, restrictions
-
-
Constructor Summary
Constructors Constructor Description PermissionsI()
PermissionsI(java.lang.String representation)
PermissionsI(ome.model.internal.Permissions sourceP)
PermissionsI(PermissionsI perms)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
canAnnotate(Ice.Current c)
Whether the current user has permissions for annotating this object.boolean
canChgrp(Ice.Current c)
Whether the current user has the ""chgrp"" permissions for this object.boolean
canChown(Ice.Current c)
Whether the current user has the ""chown"" permissions for this object.boolean
canDelete(Ice.Current c)
Whether the current user has the ""delete"" permissions for this object.boolean
canEdit(Ice.Current c)
Whether the current user has the ""edit"" permissions for this object.boolean
canLink(Ice.Current c)
Whether the current user has the ""link"" permissions for this object.void
copyObject(ome.util.Filterable model, ome.util.ModelMapper _mapper)
ome.util.Filterable
fillObject(ome.util.ReverseModelMapper _mapper)
long
getPerm1(Ice.Current current)
Do not use!protected boolean
granted(int mask, int shift)
void
ice_postUnmarshal()
Called as Ice converts from a binary stream to a PermissionsI object.boolean
isDisallow(int restriction, Ice.Current c)
The basis for the other canX() methods.boolean
isGroupAnnotate(Ice.Current c)
boolean
isGroupRead(Ice.Current c)
boolean
isGroupWrite(Ice.Current c)
boolean
isRestricted(java.lang.String restriction, Ice.Current __current)
Returns true if the given argument is present in the extendedRestrictions set.boolean
isUserAnnotate(Ice.Current c)
boolean
isUserRead(Ice.Current c)
boolean
isUserWrite(Ice.Current c)
boolean
isWorldAnnotate(Ice.Current c)
boolean
isWorldRead(Ice.Current c)
boolean
isWorldWrite(Ice.Current c)
protected void
set(int mask, int shift, boolean on)
void
setGroupAnnotate(boolean value, Ice.Current c)
ThrowsClientError
if mutation not allowed.void
setGroupRead(boolean value, Ice.Current c)
ThrowsClientError
if mutation not allowed.void
setGroupWrite(boolean value, Ice.Current c)
ThrowsClientError
if mutation not allowed.void
setPerm1(long perm1, Ice.Current current)
Do not use! ThrowsClientError
if mutation not allowed.void
setPerm1(java.lang.Long perm1)
void
setUserAnnotate(boolean value, Ice.Current c)
ThrowsClientError
if mutation not allowed.void
setUserRead(boolean value, Ice.Current c)
ThrowsClientError
if mutation not allowed.void
setUserWrite(boolean value, Ice.Current c)
ThrowsClientError
if mutation not allowed.void
setWorldAnnotate(boolean value, Ice.Current c)
ThrowsClientError
if mutation not allowed.void
setWorldRead(boolean value, Ice.Current c)
ThrowsClientError
if mutation not allowed.void
setWorldWrite(boolean value, Ice.Current c)
ThrowsClientError
if mutation not allowed.java.lang.String
toString()
produces a String representation of thePermissionsI
similar to those on a Unix filesystem.void
unload(Ice.Current c)
-
Methods inherited from class omero.model.Permissions
___canAnnotate, ___canChgrp, ___canChown, ___canDelete, ___canEdit, ___canLink, ___getPerm1, ___isDisallow, ___isGroupAnnotate, ___isGroupRead, ___isGroupWrite, ___isRestricted, ___isUserAnnotate, ___isUserRead, ___isUserWrite, ___isWorldAnnotate, ___isWorldRead, ___isWorldWrite, ___setGroupAnnotate, ___setGroupRead, ___setGroupWrite, ___setPerm1, ___setUserAnnotate, ___setUserRead, ___setUserWrite, ___setWorldAnnotate, ___setWorldRead, ___setWorldWrite, __dispatch, __readImpl, __writeImpl, canAnnotate, canChgrp, canChown, canDelete, canEdit, canLink, clone, getPerm1, ice_id, ice_id, ice_ids, ice_ids, ice_isA, ice_isA, ice_staticId, isDisallow, isGroupAnnotate, isGroupRead, isGroupWrite, isRestricted, isUserAnnotate, isUserRead, isUserWrite, isWorldAnnotate, isWorldRead, isWorldWrite, setGroupAnnotate, setGroupRead, setGroupWrite, setPerm1, setUserAnnotate, setUserRead, setUserWrite, setWorldAnnotate, setWorldRead, setWorldWrite
-
-
-
-
Constructor Detail
-
PermissionsI
public PermissionsI()
-
PermissionsI
public PermissionsI(java.lang.String representation)
-
PermissionsI
public PermissionsI(PermissionsI perms)
-
PermissionsI
public PermissionsI(ome.model.internal.Permissions sourceP)
-
-
Method Detail
-
ice_postUnmarshal
public void ice_postUnmarshal()
Called as Ice converts from a binary stream to a PermissionsI object. Here we set__immutable
to true so that clients consuming this object cannot alter them.- Specified by:
ice_postUnmarshal
in interfaceIce.Object
- Overrides:
ice_postUnmarshal
in classIce.ObjectImpl
-
isRestricted
public boolean isRestricted(java.lang.String restriction, Ice.Current __current)
Description copied from interface:_PermissionsOperations
Returns true if the given argument is present in the extendedRestrictions set. This implies that some service-specific behavior is disallowed.- Specified by:
isRestricted
in interface_PermissionsOperations
__current
- The Current object for the invocation.
-
isDisallow
public boolean isDisallow(int restriction, Ice.Current c)
Description copied from interface:_PermissionsOperations
The basis for the other canX() methods. If the restriction at the given offset in the restriction array is true, then this method returns true (otherwise false) and the canX() methods return the opposite, i.e. isDisallow(ANNOTATERESTRICTION) == ! canAnnotate()- Specified by:
isDisallow
in interface_PermissionsOperations
c
- The Current object for the invocation.
-
canAnnotate
public boolean canAnnotate(Ice.Current c)
Description copied from interface:_PermissionsOperations
Whether the current user has permissions for annotating this object. The fact that the user has this object in hand already identifies that it's readable.- Specified by:
canAnnotate
in interface_PermissionsOperations
- Parameters:
c
- The Current object for the invocation.
-
canChgrp
public boolean canChgrp(Ice.Current c)
Description copied from interface:_PermissionsOperations
Whether the current user has the ""chgrp"" permissions for this object. This allows them to move it to a different group. The fact that the user has this object in hand already identifies that it's readable.- Specified by:
canChgrp
in interface_PermissionsOperations
- Parameters:
c
- The Current object for the invocation.
-
canChown
public boolean canChown(Ice.Current c)
Description copied from interface:_PermissionsOperations
Whether the current user has the ""chown"" permissions for this object. This allows them to give it to a different user. The fact that the user has this object in hand already identifies that it's readable.- Specified by:
canChown
in interface_PermissionsOperations
- Parameters:
c
- The Current object for the invocation.
-
canDelete
public boolean canDelete(Ice.Current c)
Description copied from interface:_PermissionsOperations
Whether the current user has the ""delete"" permissions for this object. The fact that the user has this object in hand already identifies that it's readable.- Specified by:
canDelete
in interface_PermissionsOperations
- Parameters:
c
- The Current object for the invocation.
-
canEdit
public boolean canEdit(Ice.Current c)
Description copied from interface:_PermissionsOperations
Whether the current user has the ""edit"" permissions for this object. This includes changing the values of the object. The fact that the user has this object in hand already identifies that it's readable.- Specified by:
canEdit
in interface_PermissionsOperations
- Parameters:
c
- The Current object for the invocation.
-
canLink
public boolean canLink(Ice.Current c)
Description copied from interface:_PermissionsOperations
Whether the current user has the ""link"" permissions for this object. This includes adding it to data graphs. The fact that the user has this object in hand already identifies that it's readable.- Specified by:
canLink
in interface_PermissionsOperations
- Parameters:
c
- The Current object for the invocation.
-
getPerm1
public long getPerm1(Ice.Current current)
Description copied from interface:_PermissionsOperations
Do not use!- Specified by:
getPerm1
in interface_PermissionsOperations
- Parameters:
current
- The Current object for the invocation.
-
setPerm1
public void setPerm1(long perm1, Ice.Current current)
Description copied from interface:_PermissionsOperations
Do not use! ThrowsClientError
if mutation not allowed.- Specified by:
setPerm1
in interface_PermissionsOperations
current
- The Current object for the invocation.
-
setPerm1
public void setPerm1(java.lang.Long perm1)
-
copyObject
public void copyObject(ome.util.Filterable model, ome.util.ModelMapper _mapper)
- Specified by:
copyObject
in interfaceome.model.ModelBased
-
fillObject
public ome.util.Filterable fillObject(ome.util.ReverseModelMapper _mapper)
- Specified by:
fillObject
in interfaceome.model.ModelBased
-
unload
public void unload(Ice.Current c)
-
isUserRead
public boolean isUserRead(Ice.Current c)
- Specified by:
isUserRead
in interface_PermissionsOperations
-
setUserRead
public void setUserRead(boolean value, Ice.Current c)
Description copied from interface:_PermissionsOperations
ThrowsClientError
if mutation not allowed.- Specified by:
setUserRead
in interface_PermissionsOperations
c
- The Current object for the invocation.
-
isUserWrite
public boolean isUserWrite(Ice.Current c)
- Specified by:
isUserWrite
in interface_PermissionsOperations
-
setUserWrite
public void setUserWrite(boolean value, Ice.Current c)
Description copied from interface:_PermissionsOperations
ThrowsClientError
if mutation not allowed.- Specified by:
setUserWrite
in interface_PermissionsOperations
c
- The Current object for the invocation.
-
isUserAnnotate
public boolean isUserAnnotate(Ice.Current c)
- Specified by:
isUserAnnotate
in interface_PermissionsOperations
-
setUserAnnotate
public void setUserAnnotate(boolean value, Ice.Current c)
Description copied from interface:_PermissionsOperations
ThrowsClientError
if mutation not allowed.- Specified by:
setUserAnnotate
in interface_PermissionsOperations
c
- The Current object for the invocation.
-
isGroupRead
public boolean isGroupRead(Ice.Current c)
- Specified by:
isGroupRead
in interface_PermissionsOperations
-
setGroupRead
public void setGroupRead(boolean value, Ice.Current c)
Description copied from interface:_PermissionsOperations
ThrowsClientError
if mutation not allowed.- Specified by:
setGroupRead
in interface_PermissionsOperations
c
- The Current object for the invocation.
-
isGroupWrite
public boolean isGroupWrite(Ice.Current c)
- Specified by:
isGroupWrite
in interface_PermissionsOperations
-
setGroupWrite
public void setGroupWrite(boolean value, Ice.Current c)
Description copied from interface:_PermissionsOperations
ThrowsClientError
if mutation not allowed.- Specified by:
setGroupWrite
in interface_PermissionsOperations
c
- The Current object for the invocation.
-
isGroupAnnotate
public boolean isGroupAnnotate(Ice.Current c)
- Specified by:
isGroupAnnotate
in interface_PermissionsOperations
-
setGroupAnnotate
public void setGroupAnnotate(boolean value, Ice.Current c)
Description copied from interface:_PermissionsOperations
ThrowsClientError
if mutation not allowed.- Specified by:
setGroupAnnotate
in interface_PermissionsOperations
c
- The Current object for the invocation.
-
isWorldRead
public boolean isWorldRead(Ice.Current c)
- Specified by:
isWorldRead
in interface_PermissionsOperations
-
setWorldRead
public void setWorldRead(boolean value, Ice.Current c)
Description copied from interface:_PermissionsOperations
ThrowsClientError
if mutation not allowed.- Specified by:
setWorldRead
in interface_PermissionsOperations
c
- The Current object for the invocation.
-
isWorldWrite
public boolean isWorldWrite(Ice.Current c)
- Specified by:
isWorldWrite
in interface_PermissionsOperations
-
setWorldWrite
public void setWorldWrite(boolean value, Ice.Current c)
Description copied from interface:_PermissionsOperations
ThrowsClientError
if mutation not allowed.- Specified by:
setWorldWrite
in interface_PermissionsOperations
c
- The Current object for the invocation.
-
isWorldAnnotate
public boolean isWorldAnnotate(Ice.Current c)
- Specified by:
isWorldAnnotate
in interface_PermissionsOperations
-
setWorldAnnotate
public void setWorldAnnotate(boolean value, Ice.Current c)
Description copied from interface:_PermissionsOperations
ThrowsClientError
if mutation not allowed.- Specified by:
setWorldAnnotate
in interface_PermissionsOperations
c
- The Current object for the invocation.
-
granted
protected boolean granted(int mask, int shift)
-
set
protected void set(int mask, int shift, boolean on)
-
toString
public java.lang.String toString()
produces a String representation of thePermissionsI
similar to those on a Unix filesystem. Unset bits are represented by a dash, while other bits are represented by a symbolic value in the correct bit position. For example, a Permissions with all rights granted to all but WORLD roles would look like: rwrw--- Overrides:
toString
in classjava.lang.Object
-
-