|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--java.rmi.server.RemoteObject
|
+--java.rmi.server.RemoteServer
|
+--java.rmi.server.UnicastRemoteObject
|
+--arlut.csd.ganymede.DBObjectBaseField
An entry in the Ganymede server's DBStore
schema dictionary. DBStore contains a collection of
DBObjectBase objects, which define
the schema information for a particular type of object held in the Ganymede
database. A DBObjectBaseField is contained within a DBObjectBase, and defines
the name, id, type, and constraints of a particular field that can be held
in DBObjects of that type, including
a controlling DBNameSpace, if
appropriate.
Each DBField held in the server's
database holds a reference to a DBObjectBaseField, and the DBField's methods
will consult the DBObjectBaseField during run-time to make decisions based
on specified constraints defined in the DBObjectBaseField.
The Ganymede schema editor uses the BaseField
remote interface to make changes to a DBObjectBaseField's constraint information
during schema editing. The Ganymede client may also use the BaseField interface
to learn about the field's type information, but it may also download a
FieldTemplate that carries a
DBObjectBaseField's type information in an efficiently retrieved summary.
| Field Summary | |
(package private) short |
allowedTarget
|
(package private) java.lang.String |
allowedTargetStr
If this is not null, then we have gotten information on this Invid DBObjectBaseField pointing to a type of object from an XML file, and we'll need to do type resolution once the schema is completely loaded from an XML stream. |
(package private) boolean |
apachemd5crypted
|
(package private) boolean |
array
true if this field is an array type |
(package private) java.lang.String |
badChars
|
(package private) arlut.csd.ganymede.DBObjectBase |
base
Object type definition for the database object class we are member of |
(package private) java.lang.Class |
classdef
class object containing the code managing dbfields of this type |
(package private) java.lang.String |
classname
name of class to manage user interactions with this field |
(package private) java.lang.String |
comment
string to be displayed in the client as a tooltip explaining this field |
(package private) boolean |
crypted
|
(package private) static boolean |
debug
|
(package private) boolean |
editInPlace
|
(package private) arlut.csd.ganymede.DBSchemaEdit |
editor
If we are being edited, this will point to an instance of a server-side schema editing class. |
(package private) java.lang.String |
falseLabel
|
(package private) short |
field_code
id of this field in the current object type |
(package private) java.lang.String |
field_name
name of this field |
(package private) short |
field_type
Field Type for this field |
(package private) java.lang.Boolean |
inUseCache
A three state flag used by isInUse() to report whether or not a particular field is in use in the loaded database. |
(package private) boolean |
labeled
|
(package private) short |
limit
max length of array |
(package private) boolean |
loading
true if we're in the middle of loading |
(package private) short |
maxLength
|
(package private) boolean |
md5crypted
|
(package private) short |
minLength
|
(package private) boolean |
multiLine
|
(package private) arlut.csd.ganymede.DBNameSpace |
namespace
|
(package private) arlut.csd.ganymede.DBObjectBaseField |
next
|
(package private) java.lang.String |
okChars
|
(package private) gnu.regexp.RE |
regexp
Compiled regular expression for input-filtering in StringDBFields. |
(package private) java.lang.String |
regexpDesc
Text description of the meaning of the regexpPat, if defined |
(package private) java.lang.String |
regexpPat
Regular Expression string for input-filtering in StringDBFields. |
(package private) boolean |
storePlaintext
|
(package private) short |
targetField
|
(package private) java.lang.String |
targetFieldStr
If this is not null, then we have gotten information on this Invid DBObjectBaseField linked to a field from an XML file, and we'll need to do type resolution once the schema is completely loaded from an XML stream. |
(package private) arlut.csd.ganymede.FieldTemplate |
template
Downloadable FieldTemplate representing the constant field type attributes represented by this DBObjectBaseField. |
(package private) int |
tmp_displayOrder
This field is used to handle field order sorting when we read an old (pre-2.0) ganymede.db file. |
(package private) java.lang.String |
trueLabel
|
(package private) boolean |
visibility
Should this field be displayed to the client? May be false for some fields intended for 'scratch-pad' use, as in serving as anchors for compound namespace use. |
(package private) static arlut.csd.ganymede.ReturnVal |
warning1
|
(package private) static arlut.csd.ganymede.ReturnVal |
warning2
|
(package private) boolean |
winHashed
|
| Fields inherited from class java.rmi.server.UnicastRemoteObject |
|
| Fields inherited from class java.rmi.server.RemoteServer |
|
| Fields inherited from class java.rmi.server.RemoteObject |
ref |
| Fields inherited from interface arlut.csd.ganymede.FieldType |
BOOLEAN, DATE, FIRSTFIELD, FLOAT, INVID, IP, LASTFIELD, NUMERIC, PASSWORD, PERMISSIONMATRIX, STRING |
| Constructor Summary | |
(package private) |
DBObjectBaseField(java.io.DataInput in,
arlut.csd.ganymede.DBObjectBase base)
Receive constructor, for binary loading from ganymede.db. |
(package private) |
DBObjectBaseField(arlut.csd.ganymede.DBObjectBase base)
Generic field constructor. |
(package private) |
DBObjectBaseField(arlut.csd.ganymede.DBObjectBase base,
arlut.csd.ganymede.DBSchemaEdit editor)
Editing base constructor. |
(package private) |
DBObjectBaseField(arlut.csd.ganymede.DBObjectBaseField original,
arlut.csd.ganymede.DBSchemaEdit editor)
Copy constructor, used during schema editing. |
| Method Summary | |
arlut.csd.ganymede.DBObjectBase |
base()
Returns the object definition that this field is defined under. |
private arlut.csd.ganymede.ReturnVal |
doBooleanXML(arlut.csd.Util.XMLItem root)
This method takes care of doing everything required to take an XMLItem tree <fielddef type="boolean"> and update this field's schema information to match. |
private arlut.csd.ganymede.ReturnVal |
doInvidXML(arlut.csd.Util.XMLItem root,
boolean doLinkResolve)
This method takes care of doing everything required to take an XMLItem tree <fielddef type="invid"> and update this field's schema information to match. |
private arlut.csd.ganymede.ReturnVal |
doIPXML(arlut.csd.Util.XMLItem root)
This method takes care of doing everything required to take an XMLItem tree <fielddef type="ip"> and update this field's schema information to match. |
private arlut.csd.ganymede.ReturnVal |
doNumericXML(arlut.csd.Util.XMLItem root)
This method takes care of doing everything required to take an XMLItem tree <fielddef type="numeric"> and update this field's schema information to match. |
private arlut.csd.ganymede.ReturnVal |
doPasswordXML(arlut.csd.Util.XMLItem root)
This method takes care of doing everything required to take an XMLItem tree <fielddef type="password"> and update this field's schema information to match. |
private arlut.csd.ganymede.ReturnVal |
doStringXML(arlut.csd.Util.XMLItem root)
This method takes care of doing everything required to take an XMLItem tree <fielddef type="string"> and update this field's schema information to match. |
(package private) void |
emit(java.io.DataOutput out)
This method is used when the database is being dumped, to write out this field definition to disk. |
(package private) void |
emitXML(arlut.csd.ganymede.XMLDumpContext xmlOut)
This method is used when the database is being dumped, to write out this field definition to disk. |
private static arlut.csd.ganymede.ReturnVal |
genWarning1()
|
private static arlut.csd.ganymede.ReturnVal |
genWarning2()
|
java.lang.String |
getBadChars()
Returns the set of unacceptable characters if this is a string or password field. |
arlut.csd.ganymede.Base |
getBase()
Returns the Base we are a part of. |
java.lang.Class |
getClassDef()
Returns the Class object managing instances of this field |
java.lang.String |
getClassName()
Returns the name of the class managing instances of this field |
java.lang.String |
getComment()
Returns the comment defined in the schema for this field |
java.lang.String |
getFalseLabel()
Returns the false Label if this is a labeled boolean field |
short |
getID()
Returns id code for this field. |
java.lang.Short |
getKey()
Returns the type id for this field definition as a Short, suitable for use in a hash. |
short |
getMaxArraySize()
Returns the array size limitation for this field if it is an array field |
short |
getMaxLength()
Returns the maximum acceptable string length if this is a string or password field. |
short |
getMinLength()
Returns the minimum acceptable string length if this is a string or password field. |
java.lang.String |
getName()
Returns the name of this field |
arlut.csd.ganymede.DBNameSpace |
getNameSpace()
Returns the DBNameSpace that this string, numeric, or IP field is associated with. |
java.lang.String |
getNameSpaceLabel()
Returns the label of this string, numeric, or IP field's namespace. |
java.lang.String |
getOKChars()
Returns the set of acceptable characters if this is a string field. |
java.lang.String |
getRegexpDesc()
Returns the text description of the regexp pattern string constraining this string field. |
java.lang.String |
getRegexpPat()
Returns the regexp pattern string constraining this string field. |
short |
getTargetBase()
Return the object type that this invid field is constrained to point to, if set |
short |
getTargetField()
If this field is a target restricted invid field, this method will return a short indicating the field in the target object that the symmetry relation applies to. |
arlut.csd.ganymede.FieldTemplate |
getTemplate()
Returns a FieldTemplate serializable field definition object for this field. |
java.lang.String |
getTrueLabel()
Returns the true Label if this is a labeled boolean field |
short |
getType()
Returns the field type |
java.lang.String |
getTypeDesc()
This method is intended to produce a human readable representation of this field definition's type attributes. |
java.lang.String |
getTypeDescHTML()
This method is intended to produce a human readable representation of this field definition's type attributes. |
boolean |
isApacheMD5Crypted()
This method returns true if this is a password field that stores passwords in Apache md5crypt() format, and can thus accept pre-crypted passwords. |
boolean |
isArray()
Returns true if this field is a vector field, false otherwise. |
boolean |
isBoolean()
Returns true if this field is of boolean type |
boolean |
isBuiltIn()
This method returns true if this field is one of the system fields present in all objects. |
boolean |
isCrypted()
This method returns true if this is a password field that stores passwords in UNIX crypt format, and can thus accept pre-crypted passwords. |
boolean |
isDate()
Returns true if this field is of date type |
boolean |
isEditable()
This method returns true if this field definition can be edited in the schema editor. |
boolean |
isEditInPlace()
Returns true if this is an invid field which is intended as an editInPlace reference for the client's rendering. |
boolean |
isFloat()
Returns true if this field is of float type |
boolean |
isInUse()
This method returns true if there are any fields of this type in the database. |
boolean |
isInvid()
Returns true if this field is of invid type |
boolean |
isIP()
Returns true if this field is of IP type |
boolean |
isLabeled()
Returns true if this is a boolean field with labels |
boolean |
isMD5Crypted()
This method returns true if this is a password field that stores passwords in OpenBSD/FreeBSD/PAM md5crypt() format, and can thus accept pre-crypted passwords. |
boolean |
isMultiLine()
Returns true if this string field is intended to be a multi-line field. |
boolean |
isNumeric()
Returns true if this field is of numeric type |
boolean |
isPassword()
Returns true if this field is of password type |
boolean |
isPermMatrix()
Returns true if this field is of permission matrix type |
boolean |
isPlainText()
This method returns true if this is a password field that will keep a copy of the password in plaintext in the Ganymede server's on-disk database. |
boolean |
isRemovable()
This method returns true if this field definition can be removed by the schema editor. |
boolean |
isString()
Returns true if this field is of string type |
boolean |
isSymmetric()
If this field is a target restricted invid field, this method will return true if this field has a symmetry relationship to the target |
private boolean |
isSystemField()
This method checks to see if this DBObjectBaseField corresponds to a system field |
boolean |
isTargetRestricted()
Returns true if this is a target restricted invid field |
boolean |
isVisible()
This method returns true if this field is intended to be visible to the client normally, false otherwise. |
boolean |
isWinHashed()
This method returns true if this is a password field that will store passwords in the two hashing formats used by Samba/Windows, the older 14-char LANMAN hash, and the newer md5/Unicode hash used by Windows NT. |
void |
print(java.io.PrintWriter out,
java.lang.String indent)
This method is used when the Ganymede server dumps its schema. |
void |
printHTML(java.io.PrintWriter out)
This method is used when the Ganymede server dumps its schema. |
(package private) void |
receive(java.io.DataInput in)
This method is used when the database is being loaded, to read in this field definition from disk. |
arlut.csd.ganymede.ReturnVal |
setApacheMD5Crypted(boolean b)
This method is used to specify that this password field should store passwords in Apache md5crypt() format. |
arlut.csd.ganymede.ReturnVal |
setArray(boolean b)
Set this field to be a vector or scalar. |
arlut.csd.ganymede.ReturnVal |
setBadChars(java.lang.String s)
Sets the set of characters that are specifically disallowed in this string or password field. |
(package private) arlut.csd.ganymede.ReturnVal |
setBase(arlut.csd.ganymede.DBObjectBase base)
|
arlut.csd.ganymede.ReturnVal |
setClassName(java.lang.String name)
Sets the name of the class managing instances of this field |
arlut.csd.ganymede.ReturnVal |
setComment(java.lang.String s)
Sets the comment defined in the schema for this field |
arlut.csd.ganymede.ReturnVal |
setCrypted(boolean b)
This method is used to specify that this password field should store passwords in UNIX crypt format. |
arlut.csd.ganymede.ReturnVal |
setEditInPlace(boolean b)
Sets whether or not this field is intended as an editInPlace reference for the client's rendering. |
arlut.csd.ganymede.ReturnVal |
setFalseLabel(java.lang.String label)
Sets the label associated with the false choice for this boolean field. |
arlut.csd.ganymede.ReturnVal |
setID(short id)
This method is used to set this field's id in the containing DBObjectBase. |
arlut.csd.ganymede.ReturnVal |
setLabeled(boolean b)
Turn labeled choices on/off for a boolean field. |
arlut.csd.ganymede.ReturnVal |
setMaxArraySize(short limit)
Set the maximum number of values allowed in this vector field. |
arlut.csd.ganymede.ReturnVal |
setMaxLength(short val)
Sets the maximum acceptable length for this string or password field. |
arlut.csd.ganymede.ReturnVal |
setMD5Crypted(boolean b)
This method is used to specify that this password field should store passwords in OpenBSD/FreeBSD/PAM md5crypt() format. |
arlut.csd.ganymede.ReturnVal |
setMinLength(short val)
Sets the minimum acceptable length for this string or password field. |
arlut.csd.ganymede.ReturnVal |
setMultiLine(boolean b)
Sets whether or not this string field should be presented as a multiline field. |
arlut.csd.ganymede.ReturnVal |
setName(java.lang.String name)
Sets the name of this field |
arlut.csd.ganymede.ReturnVal |
setName(java.lang.String name,
boolean swapIfNeeded)
Sets the name of this field |
(package private) arlut.csd.ganymede.ReturnVal |
setNameSpace(arlut.csd.ganymede.DBNameSpace newNamespace)
This method is used internally to set a namespace constraint. |
arlut.csd.ganymede.ReturnVal |
setNameSpace(java.lang.String nameSpaceId)
Set a namespace constraint for this string, numeric, or IP field. |
arlut.csd.ganymede.ReturnVal |
setOKChars(java.lang.String s)
Sets the set of characters that are allowed in this string or password field. |
arlut.csd.ganymede.ReturnVal |
setPlainText(boolean b)
This method is used to specify that this password field should keep a copy of the password in plaintext on disk, even if other hash methods are in use which could be used for Ganymede login authentication. |
arlut.csd.ganymede.ReturnVal |
setRegexpDesc(java.lang.String s)
Sets the text descriptionf or the regexp pattern string constraining this string field. |
arlut.csd.ganymede.ReturnVal |
setRegexpPat(java.lang.String s)
Sets the regexp pattern string constraining this string field. |
arlut.csd.ganymede.ReturnVal |
setTargetBase(short val)
Sets the allowed target object code of this invid field to <val>. |
arlut.csd.ganymede.ReturnVal |
setTargetBase(java.lang.String baseName)
Sets the allowed target object code of this invid field to <baseName>. |
arlut.csd.ganymede.ReturnVal |
setTargetField(short val)
Sets the field of the target object of this invid field that should be managed in the symmetry relationship if isSymmetric(). |
arlut.csd.ganymede.ReturnVal |
setTargetField(java.lang.String fieldName)
Sets the field of the target object of this invid field that should be managed in the symmetry relationship if isSymmetric(). |
arlut.csd.ganymede.ReturnVal |
setTrueLabel(java.lang.String label)
Sets the label associated with the true choice for this boolean field. |
arlut.csd.ganymede.ReturnVal |
setType(short type)
Sets the field type
for this field. |
arlut.csd.ganymede.ReturnVal |
setWinHashed(boolean b)
This method is used to specify that this password field should store passwords in the Samba/Windows hashing formats. |
(package private) arlut.csd.ganymede.ReturnVal |
setXML(arlut.csd.Util.XMLItem root,
boolean doLinkResolve,
java.io.PrintWriter err)
This method is used to read the definition for this DBObjectBaseField from a <fielddef> XMLItem tree. |
java.lang.String |
toString()
|
| Methods inherited from class java.rmi.server.UnicastRemoteObject |
clone, exportObject, exportObject, exportObject, unexportObject |
| Methods inherited from class java.rmi.server.RemoteServer |
getClientHost, getLog, setLog |
| Methods inherited from class java.rmi.server.RemoteObject |
equals, getRef, hashCode, toStub |
| Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
static final arlut.csd.ganymede.ReturnVal warning1
static final arlut.csd.ganymede.ReturnVal warning2
static final boolean debug
arlut.csd.ganymede.DBObjectBase base
java.lang.String field_name
short field_code
short field_type
Field Type for this field
boolean visibility
java.lang.String classname
java.lang.String comment
java.lang.Class classdef
boolean array
boolean loading
short limit
boolean labeled
java.lang.String trueLabel
java.lang.String falseLabel
short minLength
short maxLength
java.lang.String okChars
java.lang.String badChars
arlut.csd.ganymede.DBNameSpace namespace
boolean multiLine
java.lang.String regexpPat
StringDBFields.
java.lang.String regexpDesc
gnu.regexp.RE regexp
StringDBFields.
boolean editInPlace
short allowedTarget
short targetField
java.lang.String allowedTargetStr
java.lang.String targetFieldStr
boolean crypted
boolean md5crypted
boolean apachemd5crypted
boolean winHashed
boolean storePlaintext
arlut.csd.ganymede.DBSchemaEdit editor
arlut.csd.ganymede.FieldTemplate template
arlut.csd.ganymede.DBObjectBaseField next
java.lang.Boolean inUseCache
A three state flag used by isInUse() to report whether or not a particular field is in use in the loaded database.
int tmp_displayOrder
| Constructor Detail |
DBObjectBaseField(arlut.csd.ganymede.DBObjectBase base)
throws java.rmi.RemoteException
DBObjectBaseField(arlut.csd.ganymede.DBObjectBase base,
arlut.csd.ganymede.DBSchemaEdit editor)
throws java.rmi.RemoteException
DBObjectBaseField(java.io.DataInput in,
arlut.csd.ganymede.DBObjectBase base)
throws java.io.IOException,
java.rmi.RemoteException
DBObjectBaseField(arlut.csd.ganymede.DBObjectBaseField original,
arlut.csd.ganymede.DBSchemaEdit editor)
throws java.rmi.RemoteException
Copy constructor, used during schema editing.
IMPORTANT: BE SURE TO ALWAYS EDIT THIS METHOD IF YOU ADD ANY FIELDS TO THIS CLASS!
| Method Detail |
void emit(java.io.DataOutput out)
throws java.io.IOException
This method is used when the database is being dumped, to write out this field definition to disk. It is mated with receive().
java.io.IOException
void receive(java.io.DataInput in)
throws java.io.IOException
This method is used when the database is being loaded, to read in this field definition from disk. It is mated with emit().
java.io.IOException
void emitXML(arlut.csd.ganymede.XMLDumpContext xmlOut)
throws java.io.IOException
This method is used when the database is being dumped, to write out this field definition to disk. It is mated with receive().
java.io.IOException
arlut.csd.ganymede.ReturnVal setXML(arlut.csd.Util.XMLItem root,
boolean doLinkResolve,
java.io.PrintWriter err)
This method is used to read the definition for this DBObjectBaseField from a <fielddef> XMLItem tree.
private arlut.csd.ganymede.ReturnVal doStringXML(arlut.csd.Util.XMLItem root)
This method takes care of doing everything required to take an XMLItem tree <fielddef type="string"> and update this field's schema information to match.
private arlut.csd.ganymede.ReturnVal doBooleanXML(arlut.csd.Util.XMLItem root)
This method takes care of doing everything required to take an XMLItem tree <fielddef type="boolean"> and update this field's schema information to match.
private arlut.csd.ganymede.ReturnVal doPasswordXML(arlut.csd.Util.XMLItem root)
This method takes care of doing everything required to take an XMLItem tree <fielddef type="password"> and update this field's schema information to match.
private arlut.csd.ganymede.ReturnVal doIPXML(arlut.csd.Util.XMLItem root)
This method takes care of doing everything required to take an XMLItem tree <fielddef type="ip"> and update this field's schema information to match.
private arlut.csd.ganymede.ReturnVal doNumericXML(arlut.csd.Util.XMLItem root)
This method takes care of doing everything required to take an XMLItem tree <fielddef type="numeric"> and update this field's schema information to match.
private arlut.csd.ganymede.ReturnVal doInvidXML(arlut.csd.Util.XMLItem root,
boolean doLinkResolve)
This method takes care of doing everything required to take an XMLItem tree <fielddef type="invid"> and update this field's schema information to match.
public boolean isEditable()
This method returns true if this field definition can be edited in the schema editor.
This method will return false for the built-in universal field types that the server is dependent on for its own functioning, because those really have no reason to be edited at all.. even the field names needn't be edited by anyone, since they aren't shown in the client.
BaseFieldpublic boolean isBuiltIn()
This method returns true if this field is one of the system fields present in all objects.
isBuiltIn in interface BaseFieldpublic boolean isRemovable()
This method returns true if this field definition can be removed by the schema editor.
isRemovable in interface BaseFieldBaseFieldpublic boolean isVisible()
This method returns true if this field is intended to be visible to the client normally, false otherwise.
isVisible in interface BaseFieldBaseFieldpublic boolean isInUse()
This method returns true if there are any fields of this type in the database. The schema editing system uses this method to prevent incompatible modifications to fields that are in use in the database.
isInUse in interface BaseFieldBaseFieldpublic arlut.csd.ganymede.Base getBase()
Returns the Base we are a part of.
getBase in interface BaseFieldBaseFieldpublic arlut.csd.ganymede.FieldTemplate getTemplate()
Returns a FieldTemplate serializable field definition object for this field.
public java.lang.String getName()
Returns the name of this field
getName in interface BaseFieldBaseFieldpublic arlut.csd.ganymede.ReturnVal setName(java.lang.String name)
Sets the name of this field
setName in interface BaseFieldname - The new name to put in this fieldBaseField
public arlut.csd.ganymede.ReturnVal setName(java.lang.String name,
boolean swapIfNeeded)
Sets the name of this field
name - The new name to put in this fieldswapIfNeeded - If true, attempting to set this field's name
to a name that is already taken in the object will result in this
field's taking the new name from the other field and giving that
other field its own name. Only intended for use by setXML(), which
has higher-level code to check for uniqueness of names in an XML
schema definition.public java.lang.String getClassName()
Returns the name of the class managing instances of this field
getClassName in interface BaseFieldBaseFieldpublic arlut.csd.ganymede.ReturnVal setClassName(java.lang.String name)
Sets the name of the class managing instances of this field
setClassName in interface BaseFieldBaseFieldpublic java.lang.Class getClassDef()
Returns the Class object managing instances of this field
public java.lang.String getComment()
Returns the comment defined in the schema for this field
getComment in interface BaseFieldBaseFieldpublic arlut.csd.ganymede.ReturnVal setComment(java.lang.String s)
Sets the comment defined in the schema for this field
setComment in interface BaseFieldBaseFieldpublic short getType()
Returns the field type
Where type is one of the following
constants defined in the FieldType
interface:
static short BOOLEAN = 0; static short NUMERIC = 1; static short DATE = 2; static short STRING = 3; static short INVID = 4; static short PERMISSIONMATRIX = 5; static short PASSWORD = 6; static short IP = 7; static short FLOAT = 8;
getType in interface BaseFieldDBStore,
BaseFieldpublic arlut.csd.ganymede.ReturnVal setType(short type)
Sets the field type
for this field. Changing the basic type of a field that is already being
used in the server will cause very bad things to happen. The
right way to change an existing field is to delete the field, commit
the schema edit, edit the schema again, and recreate the field with
the desired field type.
If the new field type is not string, invid, or IP, the field will be made a scalar field.
setType in interface BaseFieldBaseFieldpublic boolean isBoolean()
Returns true if this field is of boolean type
isBoolean in interface BaseFieldBaseFieldpublic boolean isNumeric()
Returns true if this field is of numeric type
isNumeric in interface BaseFieldBaseFieldpublic boolean isFloat()
Returns true if this field is of float type
isFloat in interface BaseFieldBaseFieldpublic boolean isDate()
Returns true if this field is of date type
isDate in interface BaseFieldBaseFieldpublic boolean isString()
Returns true if this field is of string type
isString in interface BaseFieldBaseFieldpublic boolean isInvid()
Returns true if this field is of invid type
isInvid in interface BaseFieldBaseFieldpublic boolean isPermMatrix()
Returns true if this field is of permission matrix type
isPermMatrix in interface BaseFieldBaseFieldpublic boolean isPassword()
Returns true if this field is of password type
isPassword in interface BaseFieldBaseFieldpublic boolean isIP()
Returns true if this field is of IP type
isIP in interface BaseFieldBaseFieldpublic boolean isArray()
Returns true if this field is a vector field, false otherwise.
isArray in interface BaseFieldBaseFieldpublic arlut.csd.ganymede.ReturnVal setArray(boolean b)
Set this field to be a vector or scalar. If b is true, this field will be a vector, if false, scalar.
Only strings, invid's, and ip fields may be vectors. Attempting to setArray(true) for other field types will cause an IllegalArgumentException to be thrown.
It may be possible to compatibly handle the conversion from scalar to vector, but a vector to scalar change is an incompatible change.
setArray in interface BaseFieldBaseFieldpublic short getID()
Returns id code for this field. Each field in a
DBObject
has a unique code which identifies the field. This code represents
the field in the on-disk data store, and is used by
DBEditObject
to choose what field to change in the setField method.
getID in interface BaseFieldBaseFieldpublic arlut.csd.ganymede.ReturnVal setID(short id)
This method is used to set this field's id in the containing DBObjectBase. This method will return a failure if an id is selected which is already in use in another field in this object definition.
public java.lang.Short getKey()
Returns the type id for this field definition as a Short, suitable for use in a hash.
public arlut.csd.ganymede.DBObjectBase base()
Returns the object definition that this field is defined under.
arlut.csd.ganymede.ReturnVal setBase(arlut.csd.ganymede.DBObjectBase base)
public short getMaxArraySize()
Returns the array size limitation for this field if it is an array field
getMaxArraySize in interface BaseFieldBaseFieldpublic arlut.csd.ganymede.ReturnVal setMaxArraySize(short limit)
Set the maximum number of values allowed in this vector field.
setMaxArraySize in interface BaseFieldBaseFieldpublic boolean isLabeled()
Returns true if this is a boolean field with labels
isLabeled in interface BaseFieldBaseFieldpublic arlut.csd.ganymede.ReturnVal setLabeled(boolean b)
Turn labeled choices on/off for a boolean field.
This method will throw an IllegalArgumentException if this field definition is not a boolean type.
setLabeled in interface BaseFieldBaseFieldpublic java.lang.String getTrueLabel()
Returns the true Label if this is a labeled boolean field
This method will throw an IllegalArgumentException if this field definition is not a labeled boolean type.
getTrueLabel in interface BaseFieldBaseFieldpublic arlut.csd.ganymede.ReturnVal setTrueLabel(java.lang.String label)
Sets the label associated with the true choice for this boolean field.
This method will throw an IllegalArgumentException if this field definition is not a labeled boolean type.
setTrueLabel in interface BaseFieldBaseFieldpublic java.lang.String getFalseLabel()
Returns the false Label if this is a labeled boolean field
This method will throw an IllegalArgumentException if this field definition is not a labeled boolean type.
getFalseLabel in interface BaseFieldBaseFieldpublic arlut.csd.ganymede.ReturnVal setFalseLabel(java.lang.String label)
Sets the label associated with the false choice for this boolean field.
This method will throw an IllegalArgumentException if this field definition is not a labeled boolean type.
setFalseLabel in interface BaseFieldBaseFieldpublic short getMinLength()
Returns the minimum acceptable string length if this is a string or password field.
This method will throw an IllegalArgumentException if this field definition is not a string or password type.
getMinLength in interface BaseFieldBaseFieldpublic arlut.csd.ganymede.ReturnVal setMinLength(short val)
Sets the minimum acceptable length for this string or password field.
This method will throw an IllegalArgumentException if this field definition is not a string or password type.
setMinLength in interface BaseFieldBaseFieldpublic short getMaxLength()
Returns the maximum acceptable string length if this is a string or password field.
This method will throw an IllegalArgumentException if this field definition is not a string or password type.
getMaxLength in interface BaseFieldBaseFieldpublic arlut.csd.ganymede.ReturnVal setMaxLength(short val)
Sets the maximum acceptable length for this string or password field.
This method will throw an IllegalArgumentException if this field definition is not a string or password type.
setMaxLength in interface BaseFieldBaseFieldpublic java.lang.String getOKChars()
Returns the set of acceptable characters if this is a string field.
This method will throw an IllegalArgumentException if this field definition is not a string or password type.
getOKChars in interface BaseFieldBaseFieldpublic arlut.csd.ganymede.ReturnVal setOKChars(java.lang.String s)
Sets the set of characters that are allowed in this string or password field. If s is null, all characters by default are acceptable.
This method will throw an IllegalArgumentException if this field definition is not a string or password type.
setOKChars in interface BaseFieldBaseFieldpublic java.lang.String getBadChars()
Returns the set of unacceptable characters if this is a string or password field.
This method will throw an IllegalArgumentException if this field definition is not a string or password type.
getBadChars in interface BaseFieldBaseFieldpublic arlut.csd.ganymede.ReturnVal setBadChars(java.lang.String s)
Sets the set of characters that are specifically disallowed in this string or password field.
This method will throw an IllegalArgumentException if this field definition is not a string or password type.
setBadChars in interface BaseFieldBaseFieldpublic boolean isMultiLine()
Returns true if this string field is intended to be a multi-line field.
This method will throw an IllegalArgumentException if this field definition is not a string type.
isMultiLine in interface BaseFieldBaseFieldpublic arlut.csd.ganymede.ReturnVal setMultiLine(boolean b)
Sets whether or not this string field should be presented as a multiline field.
This method will throw an IllegalArgumentException if this field definition is not a string type.
setMultiLine in interface BaseFieldBaseFieldpublic java.lang.String getRegexpPat()
Returns the regexp pattern string constraining this string field.
This method will throw an IllegalArgumentException if this field definition is not a string type.
getRegexpPat in interface BaseFieldBaseFieldpublic java.lang.String getRegexpDesc()
Returns the text description of the regexp pattern string constraining this string field.
This method will throw an IllegalArgumentException if this field definition is not a string type.
getRegexpDesc in interface BaseFieldBaseFieldpublic arlut.csd.ganymede.ReturnVal setRegexpPat(java.lang.String s)
Sets the regexp pattern string constraining this string field.
This method will throw an IllegalArgumentException if this field definition is not a string type.
setRegexpPat in interface BaseFieldBaseFieldpublic arlut.csd.ganymede.ReturnVal setRegexpDesc(java.lang.String s)
Sets the text descriptionf or the regexp pattern string constraining this string field.
This method will throw an IllegalArgumentException if this field definition is not a string type.
setRegexpDesc in interface BaseFieldBaseFieldpublic arlut.csd.ganymede.DBNameSpace getNameSpace()
Returns the DBNameSpace that this string, numeric, or IP field is associated with.
public java.lang.String getNameSpaceLabel()
Returns the label of this string, numeric, or IP field's namespace.
getNameSpaceLabel in interface BaseFieldBaseFieldpublic arlut.csd.ganymede.ReturnVal setNameSpace(java.lang.String nameSpaceId)
Set a namespace constraint for this string, numeric, or IP field.
Note that this is intended to be called from the Schema Editor, and won't take effect until the next time the system is stopped and reloaded.
This method will throw an IllegalArgumentException if this field definition is not a string, numeric, or IP type.
setNameSpace in interface BaseFieldBaseFieldarlut.csd.ganymede.ReturnVal setNameSpace(arlut.csd.ganymede.DBNameSpace newNamespace)
This method is used internally to set a namespace constraint.
It does not appear that this method is currently used.. rather that
setNameSpace(string) is.
This method will throw an IllegalArgumentException if this field definition is not a string, numeric, or IP type.
public boolean isEditInPlace()
Returns true if this is an invid field which is intended as an editInPlace reference for the client's rendering.
isEditInPlace in interface BaseFieldBaseFieldpublic arlut.csd.ganymede.ReturnVal setEditInPlace(boolean b)
Sets whether or not this field is intended as an editInPlace reference for the client's rendering.
This method will throw an IllegalArgumentException if this field definition is not an invid type.
setEditInPlace in interface BaseFieldBaseFieldpublic boolean isTargetRestricted()
Returns true if this is a target restricted invid field
This method will throw an IllegalArgumentException if this field definition is not an invid type.
isTargetRestricted in interface BaseFieldBaseFieldpublic short getTargetBase()
Return the object type that this invid field is constrained to point to, if set
-1 means there is no restriction on target type.
-2 means there is no restriction on target type, but there is a specified symmetric field.
This method will throw an IllegalArgumentException if this field definition is not an invid type.
getTargetBase in interface BaseFieldBaseFieldpublic arlut.csd.ganymede.ReturnVal setTargetBase(short val)
Sets the allowed target object code of this invid field to <val>. If val is -1, this invid field can point to objects of any type.
This method will throw an IllegalArgumentException if this field definition is not an invid type.
setTargetBase in interface BaseFieldBaseFieldpublic arlut.csd.ganymede.ReturnVal setTargetBase(java.lang.String baseName)
Sets the allowed target object code of this invid field to <baseName>. If val is null, this invid field can point to objects of any type.
This method will throw an IllegalArgumentException if this field definition is not an invid type.
setTargetBase in interface BaseFieldBaseFieldpublic boolean isSymmetric()
If this field is a target restricted invid field, this method will return true if this field has a symmetry relationship to the target
This method will throw an IllegalArgumentException if this field definition is not an invid type.
isSymmetric in interface BaseFieldBaseFieldpublic short getTargetField()
If this field is a target restricted invid field, this method will return a short indicating the field in the target object that the symmetry relation applies to.
This method will throw an IllegalArgumentException if this field definition is not an invid type.
getTargetField in interface BaseFieldBaseFieldpublic arlut.csd.ganymede.ReturnVal setTargetField(short val)
Sets the field of the target object of this invid field that should be managed in the symmetry relationship if isSymmetric(). If val == -1, the targetField will be set to a value representing no selection.
This method will throw an IllegalArgumentException if this field definition is not an invid type.
setTargetField in interface BaseFieldBaseFieldpublic arlut.csd.ganymede.ReturnVal setTargetField(java.lang.String fieldName)
Sets the field of the target object of this invid field that should be managed in the symmetry relationship if isSymmetric(). If <fieldName> is null, the targetField will be cleared.
This method will throw an IllegalArgumentException if this field definition is not an invid type.
setTargetField in interface BaseFieldBaseFieldpublic boolean isCrypted()
This method returns true if this is a password field that stores passwords in UNIX crypt format, and can thus accept pre-crypted passwords.
isCrypted in interface BaseFieldBaseFieldpublic arlut.csd.ganymede.ReturnVal setCrypted(boolean b)
This method is used to specify that this password field should store passwords in UNIX crypt format. If passwords are stored in UNIX crypt format, they will not be kept in plaintext on disk, regardless of the setting of setPlainText().
setCrypted() is not mutually exclusive with setMD5Crypted().
This method will throw an IllegalArgumentException if this field definition is not a password type.
setCrypted in interface BaseFieldBaseFieldpublic boolean isMD5Crypted()
This method returns true if this is a password field that stores passwords in OpenBSD/FreeBSD/PAM md5crypt() format, and can thus accept pre-crypted passwords.
isMD5Crypted in interface BaseFieldBaseFieldpublic arlut.csd.ganymede.ReturnVal setMD5Crypted(boolean b)
This method is used to specify that this password field should store passwords in OpenBSD/FreeBSD/PAM md5crypt() format. If passwords are stored in md5crypt() format, they will not be kept in plaintext on disk, unless isPlainText() returns true.
setMD5Crypted() is not mutually exclusive with any other encryption or plaintext options.
This method will throw an IllegalArgumentException if this field definition is not a password type.
setMD5Crypted in interface BaseFieldBaseFieldpublic boolean isApacheMD5Crypted()
This method returns true if this is a password field that stores passwords in Apache md5crypt() format, and can thus accept pre-crypted passwords.
isApacheMD5Crypted in interface BaseFieldBaseFieldpublic arlut.csd.ganymede.ReturnVal setApacheMD5Crypted(boolean b)
This method is used to specify that this password field should store passwords in Apache md5crypt() format. If passwords are stored in Apache md5crypt() format, they will not be kept in plaintext on disk, unless isPlainText() returns true.
setApacheMD5Crypted() is not mutually exclusive with any other encryption or plaintext options.
This method will throw an IllegalArgumentException if this field definition is not a password type.
setApacheMD5Crypted in interface BaseFieldBaseFieldpublic boolean isWinHashed()
This method returns true if this is a password field that will store passwords in the two hashing formats used by Samba/Windows, the older 14-char LANMAN hash, and the newer md5/Unicode hash used by Windows NT. If passwords are stored in the windows hashing formats, they will not be kept in plaintext on disk, unless isPlainText() returns true.
isWinHashed in interface BaseFieldBaseFieldpublic arlut.csd.ganymede.ReturnVal setWinHashed(boolean b)
This method is used to specify that this password field should store passwords in the Samba/Windows hashing formats.
setWinHashed() is not mutually exclusive with any other encryption or plaintext options.
This method will throw an IllegalArgumentException if this field definition is not a password type.
setWinHashed in interface BaseFieldBaseFieldpublic boolean isPlainText()
This method returns true if this is a password field that will keep a copy of the password in plaintext in the Ganymede server's on-disk database.
isPlainText in interface BaseFieldBaseFieldpublic arlut.csd.ganymede.ReturnVal setPlainText(boolean b)
This method is used to specify that this password field should keep a copy of the password in plaintext on disk, even if other hash methods are in use which could be used for Ganymede login authentication. If no hash methods are enabled for this password field, plaintext will be stored on disk even if isPlainText() returns false for this field definition.
This method will throw an IllegalArgumentException if this field definition is not a password type.
setPlainText in interface BaseFieldBaseFieldprivate boolean isSystemField()
This method checks to see if this DBObjectBaseField corresponds to a system field
public java.lang.String getTypeDesc()
This method is intended to produce a human readable representation of this field definition's type attributes. This method should not be used programatically to determine this field's type information.
This method is only for human information, and the precise results returned are subject to change at any time.
getTypeDesc in interface BaseFieldBaseFieldpublic java.lang.String getTypeDescHTML()
This method is intended to produce a human readable representation of this field definition's type attributes. This method should not be used programatically to determine this field's type information.
This method is only for human elucidation, and the precise results returned are subject to change at any time.
BaseFieldpublic void printHTML(java.io.PrintWriter out)
This method is used when the Ganymede server dumps its schema. It prints an HTML description of this field type to the PrintWriter specified.
This method was written in concert with the other DBStore objects' printHTML methods, and assumes that it will be run in the context of the full DBStore.printCategoryTreeHTML() method.
public void print(java.io.PrintWriter out,
java.lang.String indent)
This method is used when the Ganymede server dumps its schema. It prints an ASCII description of this field type to the PrintWriter specified.
This method was written in concert with the other DBStore objects' print methods, and assumes that it will be run in the context of the full DBStore.printBases() method.
public java.lang.String toString()
toString in class java.rmi.server.RemoteObjectprivate static arlut.csd.ganymede.ReturnVal genWarning1()
private static arlut.csd.ganymede.ReturnVal genWarning2()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||