ome.system
Class Principal

java.lang.Object
  extended by ome.system.Principal
All Implemented Interfaces:
Serializable, Principal

public class Principal
extends Object
implements Principal, Serializable

implementation of Principal. Specialized for Omero to carry a group, an event type and a umask.

Since:
3.0
Version:
$Revision: 2243 $, $Date: 2008-02-22 09:35:54 +0000 (Fri, 22 Feb 2008) $
Author:
Josh Moore, josh.moore at gmx.de
See Also:
EventType, ExperimenterGroup, Permissions, Serialized Form

Field Summary
protected  String group
           
protected  String name
           
protected  String type
           
protected  ome.model.internal.Permissions umask
           
 
Constructor Summary
Principal(String name)
          Creates a Principal with null group and event type.
Principal(String name, String group, String eventType)
           
 
Method Summary
 String getEventType()
           
 String getGroup()
           
 String getName()
           
 ome.model.internal.Permissions getUmask()
           
 boolean hasUmask()
           
 void setUmask(ome.model.internal.Permissions mask)
           
 String toString()
          returns only the name of the instance because that is the expected behavior of Principal implementations
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.security.Principal
equals, hashCode
 

Field Detail

name

protected String name

group

protected String group

type

protected String type

umask

protected ome.model.internal.Permissions umask
Constructor Detail

Principal

public Principal(String name)
Creates a Principal with null group and event type. These must be taken from the session.

Parameters:
name -

Principal

public Principal(String name,
                 String group,
                 String eventType)
Method Detail

getName

public String getName()
Specified by:
getName in interface Principal

getGroup

public String getGroup()

getEventType

public String getEventType()

hasUmask

public boolean hasUmask()

getUmask

public ome.model.internal.Permissions getUmask()

setUmask

public void setUmask(ome.model.internal.Permissions mask)

toString

public String toString()
returns only the name of the instance because that is the expected behavior of Principal implementations

Specified by:
toString in interface Principal
Overrides:
toString in class Object
Returns:
value of name


OmeroJava Api

Version: Beta-4.1.1-r5927-b91

Copyright © 2009 The University of Dundee. All Rights Reserved.