public class BaseDump extends java.lang.Object implements Base, CategoryNode
This class is intended to serve as a stub to hold basic information about server side categories for the client to process locally.
Many of the methods in the Base interface are there to support remote schema editing by the admin console's schema editor, and have no effect when called on instances of this class. RuntimeException's will be thrown if those methods are called on BaseDump.
Note that even though this class is implementing a remote interface, it is doing so for the purpose of providing a consistent interface for the client, not for actual remote access. Thus, we are not extending UnicastRemoteObject as we would if we were truly a remote object.
| Modifier and Type | Field and Description |
|---|---|
(package private) boolean |
canCreate |
(package private) boolean |
canInactivate |
(package private) boolean |
isEmbedded |
(package private) short |
label_id |
(package private) java.lang.String |
labelFieldName |
private int |
lastIndex |
(package private) java.lang.String |
name |
(package private) CategoryDump |
parent |
(package private) java.lang.String |
pathedName |
(package private) short |
type_code |
| Constructor and Description |
|---|
BaseDump(BaseListTransport baselist,
char[] src,
int index)
Constructor for use by a BaseListTransport object
|
BaseDump(CategoryDump parent,
char[] src,
int index)
Constructor for use by a CategoryDump object
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
canCreate(Session session)
We ignore the Session param here, since we're a client side dump
associated with a known Session.
|
boolean |
canInactivate()
Returns true if this object type can be inactivated.
|
BaseField |
createNewField()
Creates a new base field and inserts it
into the DBObjectBase field definitions hash.
|
ReturnVal |
deleteField(java.lang.String baseName)
This method is used to remove a field definition from
the current schema.
|
boolean |
fieldInUse(java.lang.String baseName)
This method is used by the SchemaEditor to detect whether any
objects are using a field definition.
|
Category |
getCategory()
Get the parent Category for this object type.
|
private java.lang.String |
getChunk(char[] chars,
int startDex) |
java.lang.String |
getClassName()
Returns the name of the class managing this object type
|
java.lang.String |
getClassOptionString()
Returns the option string for the class definition.
|
BaseField |
getField(short id)
Returns the field definition for the field matching id,
or null if no match found.
|
BaseField |
getField(java.lang.String name)
Returns the field definition for the field matching name,
or null if no match found.
|
java.util.Vector<BaseField> |
getFields()
This method returns a list of all
BaseField references for the
fields defined by this object type, in random order. |
java.util.Vector<BaseField> |
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.
|
BaseField |
getLabelFieldDef()
Returns the BaseField for the field designated as this object's
primary label field.
|
java.lang.String |
getLabelFieldName()
Returns the field name for the field designated as this object's
primary label field.
|
int |
getLastIndex() |
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.
|
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.
|
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.
|
void |
setCategory(Category category)
This method tells the CategoryNode what it's containing
category is.
|
ReturnVal |
setClassInfo(java.lang.String newClassName,
java.lang.String newClassOptionString)
This method is used to associate a management class with this
object base.
|
ReturnVal |
setLabelField(short fieldID)
Sets the required label field for this Base by numeric field id.
|
ReturnVal |
setLabelField(java.lang.String fieldName)
Sets the required label field for this Base by field name.
|
ReturnVal |
setName(java.lang.String newName)
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.lang.String |
toString()
as a convenience for using the standard VecQuickSort comparator.
|
CategoryDump parent
java.lang.String name
java.lang.String pathedName
short type_code
short label_id
java.lang.String labelFieldName
boolean canInactivate
boolean canCreate
boolean isEmbedded
private int lastIndex
public BaseDump(CategoryDump parent, char[] src, int index)
public BaseDump(BaseListTransport baselist, char[] src, int index)
public int getLastIndex()
public void setCategory(Category category)
setCategory in interface CategoryNodepublic boolean isRemovable()
BaseThis 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.
isRemovable in interface Basepublic boolean isEmbedded()
BaseisEmbedded in interface Basepublic java.lang.String getName()
BasegetName in interface BasegetName in interface CategoryNodepublic java.lang.String getPath()
BasegetPath in interface BasegetPath in interface CategoryNodepublic java.lang.String getClassName()
BasegetClassName in interface Basepublic java.lang.String getClassOptionString()
BaseJythonEditObjectFactory
subclass.getClassOptionString in interface Basepublic short getTypeID()
Basepublic short getLabelField()
BasegetLabelField in interface Basepublic BaseField getLabelFieldDef()
BasegetLabelFieldDef in interface Basepublic java.lang.String getLabelFieldName()
BasegetLabelFieldName in interface Basepublic java.util.Vector<BaseField> getFields(boolean includeBuiltIns)
BaseReturns 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.
public java.util.Vector<BaseField> getFields()
BaseThis method returns a list of all
BaseField references for the
fields defined by this object type, in random order.
public BaseField getField(short id)
Basepublic BaseField getField(java.lang.String name)
Basepublic boolean canCreate(Session session)
public boolean canInactivate()
BasecanInactivate in interface BaseBasepublic ReturnVal setName(java.lang.String newName)
BaseSets 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.
public ReturnVal setClassInfo(java.lang.String newClassName, java.lang.String newClassOptionString)
BaseThis method is used to associate a management class with this object base.
The newClassName argument must be fully qualified, and must
refer to one of two kinds of classes. The first is a DBEditObject subclass that
implements the requisite three constructors, a la the traditional
Ganymede customization hook. The second is any class
implementing the {link arlut.csd.ganymede.common.DDPluginFactory
DDPluginFactory} interface, which provides a set of factory
methods which return DBEditObject instances.
If newClassName implements DDPluginFactory, the newOptionString argument will be available to the factory methods so that the constructed objects can be dynamically customized. This is intended to support the use of DBEditObject subclasses written in Jython, with support for dynamic reloading during server execution.
This method is only valid when the Base reference is obtained
from a SchemaEdit reference
by the Ganymede schema editor.
setClassInfo in interface Basepublic ReturnVal moveFieldAfter(java.lang.String fieldName, java.lang.String previousFieldName)
BaseThis method is used to adjust the ordering of a custom field in this Base.
moveFieldAfter in interface BasefieldName - The name of the field to movepreviousFieldName - 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.public ReturnVal moveFieldBefore(java.lang.String fieldName, java.lang.String nextFieldName)
BaseThis method is used to adjust the ordering of a custom field in this Base.
moveFieldBefore in interface BasefieldName - The name of the field to movenextFieldName - 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.public ReturnVal setLabelField(java.lang.String fieldName)
BaseSets the required label field for this Base by field name.
This method is only valid when the Base reference is obtained
from a SchemaEdit reference
by the Ganymede schema editor.
setLabelField in interface Basepublic ReturnVal setLabelField(short fieldID)
BaseSets the required label field for this Base by numeric field id.
This method is only valid when the Base reference is obtained
from a SchemaEdit reference
by the Ganymede schema editor.
setLabelField in interface Basepublic Category getCategory()
BaseGet 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.
getCategory in interface BasegetCategory in interface CategoryNodepublic BaseField createNewField()
BaseCreates 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.
createNewField in interface Basepublic ReturnVal deleteField(java.lang.String baseName)
BaseThis 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.
deleteField in interface BaseBasepublic boolean fieldInUse(java.lang.String baseName)
BasefieldInUse in interface BaseBaseprivate java.lang.String getChunk(char[] chars,
int startDex)
public java.lang.String toString()
as a convenience for using the standard VecQuickSort comparator.
toString in class java.lang.Object