arlut.csd.ganymede
Interface Base

All Superinterfaces:
CategoryNode, java.rmi.Remote
All Known Implementing Classes:
BaseDump, DBObjectBase

public interface Base
extends CategoryNode, java.rmi.Remote

Client side interface definition for the Ganymede DBObjectBase class. This interface allows the client to query type information remotely, and allows the schema editor in the admin console to remotely edit object type information.

The Category interface is also vital to the client and schema editor's work with object types.


Method Summary
 boolean canCreate(arlut.csd.ganymede.Session session)
          Returns true if the current session is permitted to create an object of this type.
 boolean canInactivate()
          Returns true if this object type can be inactivated.
 arlut.csd.ganymede.BaseField createNewField()
          Creates a new base field and inserts it into the DBObjectBase field definitions hash.
 arlut.csd.ganymede.ReturnVal deleteField(java.lang.String fieldName)
          This method is used to remove a field definition from the current schema.
 boolean fieldInUse(java.lang.String fieldName)
          This method is used by the SchemaEditor to detect whether any objects are using a field definition.
 arlut.csd.ganymede.Category getCategory()
          Get the parent Category for this object type.
 java.lang.String getClassName()
          Returns the name of the class managing this object type
 arlut.csd.ganymede.BaseField getField(short id)
          Returns the field definition for the field matching id, or null if no match found.
 arlut.csd.ganymede.BaseField getField(java.lang.String name)
          Returns the field definition for the field matching name, or null if no match found.
 java.util.Vector getFields()
          This method returns a list of all BaseField references for the fields defined by this object type, in random order.
 java.util.Vector getFields(boolean includeBuiltIns)
          Returns BaseField base field definitions for objects of this type.
 short getLabelField()
          Returns the short type id for the field designated as this object's primary label field, if any.
 java.lang.String getLabelFieldName()
          Returns the field name for the field designated as this object's primary label field.
 java.lang.String getName()
          Returns the name of this object type.
 java.lang.String getPath()
          Returns the name and category path of this object type.
 short getTypeID()
          Returns the invid type id for this object definition
 boolean isEmbedded()
          This method returns true if this object base is for an embedded object.
 boolean isRemovable()
          This method indicates whether this base may be removed in the Schema Editor.
 arlut.csd.ganymede.ReturnVal moveFieldAfter(java.lang.String fieldName, java.lang.String previousFieldName)
          This method is used to adjust the ordering of a custom field in this Base.
 arlut.csd.ganymede.ReturnVal moveFieldBefore(java.lang.String fieldName, java.lang.String nextFieldName)
          This method is used to adjust the ordering of a custom field in this Base.
 arlut.csd.ganymede.ReturnVal setClassName(java.lang.String newName)
          Sets the fully qualified classname of the class managing this object type
 arlut.csd.ganymede.ReturnVal setLabelField(short fieldID)
          Choose what field will serve as this objectBase's label.
 arlut.csd.ganymede.ReturnVal setLabelField(java.lang.String fieldName)
          Choose what field will serve as this objectBase's label.
 arlut.csd.ganymede.ReturnVal setName(java.lang.String newName)
          Sets the name for this object type
 
Methods inherited from interface arlut.csd.ganymede.CategoryNode
setCategory
 

Method Detail

isRemovable

public boolean isRemovable()
                    throws java.rmi.RemoteException

This method indicates whether this base may be removed in the Schema Editor.

We don't allow removal of built-in Bases that the server depends on for its operation, such as permissions, notification, and logging object types.

java.rmi.RemoteException

isEmbedded

public boolean isEmbedded()
                   throws java.rmi.RemoteException
This method returns true if this object base is for an embedded object. Embedded objects do not have their own expiration and removal dates, do not have history trails, and can be only owned by a single object, not by a list of administrators.

java.rmi.RemoteException

getName

public java.lang.String getName()
                         throws java.rmi.RemoteException
Returns the name of this object type. Guaranteed to be unique in the Ganymede server.

Specified by:
getName in interface CategoryNode
java.rmi.RemoteException

getPath

public java.lang.String getPath()
                         throws java.rmi.RemoteException
Returns the name and category path of this object type. Guaranteed to be unique in the Ganymede server.

Specified by:
getPath in interface CategoryNode
java.rmi.RemoteException

getClassName

public java.lang.String getClassName()
                              throws java.rmi.RemoteException
Returns the name of the class managing this object type

java.rmi.RemoteException

getTypeID

public short getTypeID()
                throws java.rmi.RemoteException
Returns the invid type id for this object definition

java.rmi.RemoteException

getLabelField

public short getLabelField()
                    throws java.rmi.RemoteException
Returns the short type id for the field designated as this object's primary label field, if any. Objects do not need to have a primary label field designated if labels for this object type are dynamically generated.

java.rmi.RemoteException

getLabelFieldName

public java.lang.String getLabelFieldName()
                                   throws java.rmi.RemoteException
Returns the field name for the field designated as this object's primary label field. null is returned if no label has been designated.

java.rmi.RemoteException

getFields

public java.util.Vector getFields(boolean includeBuiltIns)
                           throws java.rmi.RemoteException

Returns BaseField base field definitions for objects of this type.

If includeBuiltIns is false, the fields returned will be the custom fields defined for this object type, and they will be returned in display order. If includeBuiltIns is true, the built-in fields will be appended to the Vector after the custom types, in random order.

java.rmi.RemoteException

getFields

public java.util.Vector getFields()
                           throws java.rmi.RemoteException

This method returns a list of all BaseField references for the fields defined by this object type, in random order.

java.rmi.RemoteException

getField

public arlut.csd.ganymede.BaseField getField(short id)
                                      throws java.rmi.RemoteException
Returns the field definition for the field matching id, or null if no match found.

java.rmi.RemoteException

getField

public arlut.csd.ganymede.BaseField getField(java.lang.String name)
                                      throws java.rmi.RemoteException
Returns the field definition for the field matching name, or null if no match found.

java.rmi.RemoteException

canCreate

public boolean canCreate(arlut.csd.ganymede.Session session)
                  throws java.rmi.RemoteException
Returns true if the current session is permitted to create an object of this type.

java.rmi.RemoteException

canInactivate

public boolean canInactivate()
                      throws java.rmi.RemoteException
Returns true if this object type can be inactivated. Not all object types will have inactivation protocols defined in the server. Those that do not can just be deleted.

java.rmi.RemoteException
See Also:
Base

setName

public arlut.csd.ganymede.ReturnVal setName(java.lang.String newName)
                                     throws java.rmi.RemoteException

Sets the name for this object type

This method is only valid when the Base reference is obtained from a SchemaEdit reference by the Ganymede schema editor.

java.rmi.RemoteException

setClassName

public arlut.csd.ganymede.ReturnVal setClassName(java.lang.String newName)
                                          throws java.rmi.RemoteException

Sets the fully qualified classname of the class managing this object type

This method is only valid when the Base reference is obtained from a SchemaEdit reference by the Ganymede schema editor.

java.rmi.RemoteException

moveFieldAfter

public arlut.csd.ganymede.ReturnVal moveFieldAfter(java.lang.String fieldName,
                                                   java.lang.String previousFieldName)
                                            throws java.rmi.RemoteException

This method is used to adjust the ordering of a custom field in this Base.

Parameters:
fieldName - The name of the field to move
previousFieldName - The name of the field that fieldName is going to be put after, or null if fieldName is to be the first field displayed in this object type.
java.rmi.RemoteException

moveFieldBefore

public arlut.csd.ganymede.ReturnVal moveFieldBefore(java.lang.String fieldName,
                                                    java.lang.String nextFieldName)
                                             throws java.rmi.RemoteException

This method is used to adjust the ordering of a custom field in this Base.

Parameters:
fieldName - The name of the field to move
nextFieldName - The name of the field that fieldName is going to be put before, or null if fieldName is to be the last field displayed in this object type.
java.rmi.RemoteException

setLabelField

public arlut.csd.ganymede.ReturnVal setLabelField(java.lang.String fieldName)
                                           throws java.rmi.RemoteException

Choose what field will serve as this objectBase's label. A fieldName parameter of null will cause the object's label field to be undefined, in which case the object will have to generate its own label using the getLabelHook() method.

This method is only valid when the Base reference is obtained from a SchemaEdit reference by the Ganymede schema editor.

java.rmi.RemoteException

setLabelField

public arlut.csd.ganymede.ReturnVal setLabelField(short fieldID)
                                           throws java.rmi.RemoteException

Choose what field will serve as this objectBase's label. A fieldID parameter of -1 will cause the object's label field to be undefined, in which case the object will have to generate its own label using the getLabelHook() method.

This method is only valid when the Base reference is obtained from a SchemaEdit reference by the Ganymede schema editor.

java.rmi.RemoteException

getCategory

public arlut.csd.ganymede.Category getCategory()
                                        throws java.rmi.RemoteException

Get the parent Category for this object type. This is used by the Ganymede client and schema editor to present object types in a hierarchical tree.

This method is only valid when the Base reference is obtained from a SchemaEdit reference by the Ganymede schema editor.

Specified by:
getCategory in interface CategoryNode
java.rmi.RemoteException

createNewField

public arlut.csd.ganymede.BaseField createNewField()
                                            throws java.rmi.RemoteException

Creates a new base field and inserts it into the DBObjectBase field definitions hash. The newly created field will the first short id code value available at or above 256.

This method is only valid when the Base reference is obtained from a SchemaEdit reference by the Ganymede schema editor.

java.rmi.RemoteException

deleteField

public arlut.csd.ganymede.ReturnVal deleteField(java.lang.String fieldName)
                                         throws java.rmi.RemoteException

This method is used to remove a field definition from the current schema.

Of course, this removal will only take effect if the schema editor commits.

This method is only valid when the Base reference is obtained from a SchemaEdit reference by the Ganymede schema editor.

java.rmi.RemoteException
See Also:
Base

fieldInUse

public boolean fieldInUse(java.lang.String fieldName)
                   throws java.rmi.RemoteException
This method is used by the SchemaEditor to detect whether any objects are using a field definition. If any objects of this type in the database have this field defined, this method will return true.

java.rmi.RemoteException
See Also:
Base