arlut.csd.ganymede
Interface BaseField

All Superinterfaces:
java.rmi.Remote
All Known Implementing Classes:
DBObjectBaseField

public interface BaseField
extends java.rmi.Remote

Client side interface definition for the Ganymede DBObjectBaseField class. This interface allows the client to query and edit type information remotely.

All of the editing methods may be only be called when the server is in schema editing mode.


Method Summary
 java.lang.String getBadChars()
          Returns the set of unacceptable characters if this is a string or password field.
 Base getBase()
          Returns the Base we are a part of.
 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.
 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
 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.
 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.
 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 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 address 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
 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.
 ReturnVal setArray(boolean b)
          Set this field to be a vector or scalar.
 ReturnVal setBadChars(java.lang.String s)
          Sets the set of characters that are specifically disallowed in this string or password field.
 ReturnVal setClassName(java.lang.String name)
          Sets the name of the class managing instances of this field
 ReturnVal setComment(java.lang.String s)
          Sets the comment defined in the schema for this field
 ReturnVal setCrypted(boolean b)
          This method is used to specify that this password field should store passwords in UNIX crypt format.
 ReturnVal setEditInPlace(boolean b)
          Sets whether or not this field is intended as an editInPlace reference for the client's rendering.
 ReturnVal setFalseLabel(java.lang.String label)
          Sets the label associated with the false choice for this boolean field.
 ReturnVal setLabeled(boolean b)
          Turn labeled choices on/off for a boolean field.
 ReturnVal setMaxArraySize(short limit)
          Set the maximum number of values allowed in this vector field.
 ReturnVal setMaxLength(short val)
          Sets the maximum acceptable length for this string or password field.
 ReturnVal setMD5Crypted(boolean b)
          This method is used to specify that this password field should store passwords in OpenBSD/FreeBSD/PAM md5crypt() format.
 ReturnVal setMinLength(short val)
          Sets the minimum acceptable length for this string or password field.
 ReturnVal setMultiLine(boolean b)
          Sets whether or not this string field should be presented as a multiline field.
 ReturnVal setName(java.lang.String name)
          Sets the name of this field
 ReturnVal setNameSpace(java.lang.String s)
          Set a namespace constraint for this string, numeric, or IP field.
 ReturnVal setOKChars(java.lang.String s)
          Sets the set of characters that are allowed in this string or password field.
 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.
 ReturnVal setRegexpDesc(java.lang.String s)
          Sets the text descriptionf or the regexp pattern string constraining this string field.
 ReturnVal setRegexpPat(java.lang.String s)
          Sets the regexp pattern string constraining this string field.
 ReturnVal setTargetBase(short val)
          Sets the allowed target object code of this invid field to <val>.
 ReturnVal setTargetBase(java.lang.String baseName)
          Sets the allowed target object code of this invid field to <baseName>.
 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().
 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().
 ReturnVal setTrueLabel(java.lang.String label)
          Sets the label associated with the true choice for this boolean field.
 ReturnVal setType(short type)
          Sets the field type for this field.
 ReturnVal setWinHashed(boolean b)
          This method is used to specify that this password field should store passwords in the Samba/Windows hashing formats.
 

Method Detail

isBuiltIn

public boolean isBuiltIn()
                  throws java.rmi.RemoteException

This method returns true if this field is one of the system fields present in all objects.


isRemovable

public boolean isRemovable()
                    throws java.rmi.RemoteException

This method returns true if this field definition can be removed by the schema editor.


isVisible

public boolean isVisible()
                  throws java.rmi.RemoteException

This method returns true if this field is intended to be visible to the client normally, false otherwise.


isInUse

public boolean isInUse()
                throws java.rmi.RemoteException

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.


getBase

public Base getBase()
             throws java.rmi.RemoteException

Returns the Base we are a part of.


getName

public java.lang.String getName()
                         throws java.rmi.RemoteException

Returns the name of this field


getClassName

public java.lang.String getClassName()
                              throws java.rmi.RemoteException

Returns the name of the class managing instances of this field


getComment

public java.lang.String getComment()
                            throws java.rmi.RemoteException

Returns the comment defined in the schema for this field


getID

public short getID()
            throws java.rmi.RemoteException

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.


setName

public ReturnVal setName(java.lang.String name)
                  throws java.rmi.RemoteException

Sets the name of this field


setClassName

public ReturnVal setClassName(java.lang.String name)
                       throws java.rmi.RemoteException

Sets the name of the class managing instances of this field


setComment

public ReturnVal setComment(java.lang.String s)
                     throws java.rmi.RemoteException

Sets the comment defined in the schema for this field


getType

public short getType()
              throws java.rmi.RemoteException

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;
 

isBoolean

public boolean isBoolean()
                  throws java.rmi.RemoteException

Returns true if this field is of boolean type


isNumeric

public boolean isNumeric()
                  throws java.rmi.RemoteException

Returns true if this field is of numeric type


isFloat

public boolean isFloat()
                throws java.rmi.RemoteException

Returns true if this field is of float type


isDate

public boolean isDate()
               throws java.rmi.RemoteException

Returns true if this field is of date type


isString

public boolean isString()
                 throws java.rmi.RemoteException

Returns true if this field is of string type


isInvid

public boolean isInvid()
                throws java.rmi.RemoteException

Returns true if this field is of invid type


isPermMatrix

public boolean isPermMatrix()
                     throws java.rmi.RemoteException

Returns true if this field is of permission matrix type


isPassword

public boolean isPassword()
                   throws java.rmi.RemoteException

Returns true if this field is of password type


isIP

public boolean isIP()
             throws java.rmi.RemoteException

Returns true if this field is of IP address type


setType

public ReturnVal setType(short type)
                  throws java.rmi.RemoteException

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.


isArray

public boolean isArray()
                throws java.rmi.RemoteException

Returns true if this field is a vector field, false otherwise.


getMaxArraySize

public short getMaxArraySize()
                      throws java.rmi.RemoteException

Returns the array size limitation for this field if it is an array field


setArray

public ReturnVal setArray(boolean b)
                   throws java.rmi.RemoteException

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.


setMaxArraySize

public ReturnVal setMaxArraySize(short limit)
                          throws java.rmi.RemoteException

Set the maximum number of values allowed in this vector field.


isLabeled

public boolean isLabeled()
                  throws java.rmi.RemoteException

Returns true if this is a boolean field with labels


getTrueLabel

public java.lang.String getTrueLabel()
                              throws java.rmi.RemoteException

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.


getFalseLabel

public java.lang.String getFalseLabel()
                               throws java.rmi.RemoteException

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.


setLabeled

public ReturnVal setLabeled(boolean b)
                     throws java.rmi.RemoteException

Turn labeled choices on/off for a boolean field.

This method will throw an IllegalArgumentException if this field definition is not a boolean type.


setTrueLabel

public ReturnVal setTrueLabel(java.lang.String label)
                       throws java.rmi.RemoteException

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.


setFalseLabel

public ReturnVal setFalseLabel(java.lang.String label)
                        throws java.rmi.RemoteException

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.


getMinLength

public short getMinLength()
                   throws java.rmi.RemoteException

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.


getMaxLength

public short getMaxLength()
                   throws java.rmi.RemoteException

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.


getOKChars

public java.lang.String getOKChars()
                            throws java.rmi.RemoteException

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.


getBadChars

public java.lang.String getBadChars()
                             throws java.rmi.RemoteException

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.


isMultiLine

public boolean isMultiLine()
                    throws java.rmi.RemoteException

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.


setMinLength

public ReturnVal setMinLength(short val)
                       throws java.rmi.RemoteException

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.


setMaxLength

public ReturnVal setMaxLength(short val)
                       throws java.rmi.RemoteException

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.


setOKChars

public ReturnVal setOKChars(java.lang.String s)
                     throws java.rmi.RemoteException

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.


setBadChars

public ReturnVal setBadChars(java.lang.String s)
                      throws java.rmi.RemoteException

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.

See Also:
BaseField

setMultiLine

public ReturnVal setMultiLine(boolean b)
                       throws java.rmi.RemoteException

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.


getRegexpPat

public java.lang.String getRegexpPat()
                              throws java.rmi.RemoteException

Returns the regexp pattern string constraining this string field.

This method will throw an IllegalArgumentException if this field definition is not a string type.


getRegexpDesc

public java.lang.String getRegexpDesc()
                               throws java.rmi.RemoteException

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.


setRegexpPat

public ReturnVal setRegexpPat(java.lang.String s)
                       throws java.rmi.RemoteException

Sets the regexp pattern string constraining this string field.

This method will throw an IllegalArgumentException if this field definition is not a string type.


setRegexpDesc

public ReturnVal setRegexpDesc(java.lang.String s)
                        throws java.rmi.RemoteException

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.


getNameSpaceLabel

public java.lang.String getNameSpaceLabel()
                                   throws java.rmi.RemoteException

Returns the label of this string, numeric, or IP field's namespace.


setNameSpace

public ReturnVal setNameSpace(java.lang.String s)
                       throws java.rmi.RemoteException

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.


isEditInPlace

public boolean isEditInPlace()
                      throws java.rmi.RemoteException

Returns true if this is an invid field which is intended as an editInPlace reference for the client's rendering.


setEditInPlace

public ReturnVal setEditInPlace(boolean b)
                         throws java.rmi.RemoteException

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.


isTargetRestricted

public boolean isTargetRestricted()
                           throws java.rmi.RemoteException

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.


isSymmetric

public boolean isSymmetric()
                    throws java.rmi.RemoteException

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.


getTargetBase

public short getTargetBase()
                    throws java.rmi.RemoteException

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.


getTargetField

public short getTargetField()
                     throws java.rmi.RemoteException

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.


setTargetBase

public ReturnVal setTargetBase(short val)
                        throws java.rmi.RemoteException

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

public ReturnVal setTargetBase(java.lang.String baseName)
                        throws java.rmi.RemoteException

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.


setTargetField

public ReturnVal setTargetField(short val)
                         throws java.rmi.RemoteException

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

public ReturnVal setTargetField(java.lang.String fieldName)
                         throws java.rmi.RemoteException

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.


isCrypted

public boolean isCrypted()
                  throws java.rmi.RemoteException

This method returns true if this is a password field that stores passwords in UNIX crypt format, and can thus accept pre-crypted passwords.


setCrypted

public ReturnVal setCrypted(boolean b)
                     throws java.rmi.RemoteException

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.


isMD5Crypted

public boolean isMD5Crypted()
                     throws java.rmi.RemoteException

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.


setMD5Crypted

public ReturnVal setMD5Crypted(boolean b)
                        throws java.rmi.RemoteException

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.


isWinHashed

public boolean isWinHashed()
                    throws java.rmi.RemoteException

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.


setWinHashed

public ReturnVal setWinHashed(boolean b)
                       throws java.rmi.RemoteException

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.


isPlainText

public boolean isPlainText()
                    throws java.rmi.RemoteException

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.


setPlainText

public ReturnVal setPlainText(boolean b)
                       throws java.rmi.RemoteException

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.


getTypeDesc

public java.lang.String getTypeDesc()
                             throws java.rmi.RemoteException

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.

See Also:
BaseField