planetj.database.field
Class URLReferenceField

java.lang.Object
  extended byplanetj.database.Field
      extended byplanetj.database.field.StringOrNumberField
          extended byplanetj.database.field.StringField
              extended byplanetj.database.field.URLReferenceField
All Implemented Interfaces:
java.lang.Cloneable, IActionObject, ICSVField, IExternallyNamed, IFDFObject, IGuarded, INamed, IPDFField, IXMLObject, java.io.Serializable

public class URLReferenceField
extends StringField

Wraps a field that is a url reference.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class planetj.database.Field
Field.FieldLocation
 
Field Summary
 
Fields inherited from class planetj.database.Field
ALIGN_CENTER, ALIGN_LEFT, ALIGN_RIGHT, ALIGN_UNKNOWN
 
Fields inherited from interface planetj.dataengine.security.IGuarded
TYPE_ID_UNKNOWN, TYPE_NAME_FIELD, TYPE_NAME_SQLOPERATION, TYPE_SECURED_BY_LEVEL, TYPE_SECURED_BY_OPERATION, TYPE_UNSECURED
 
Constructor Summary
URLReferenceField()
           
 
Method Summary
 java.lang.String getLinkStyleClass()
          Gets the HTML style class for the link
 java.lang.String getNewWindowProperties()
          Gets the properties of the window to open the link's target in.
 java.lang.String getNewWindowTarget()
          Gets the name of the window to open the link's target in.
 java.lang.String getURL(ExecutingContext ec)
          Gets the URL for this URLReferenceField.
 java.lang.String getURLPrefix(ExecutingContext ec)
          Gets the prefix which is prepended to this field's URL.
protected  java.lang.String getURLReference(ExecutingContext executingContext)
          Gets the unmodified URL for this URLReferenceField.
static short guessFieldClassProbability(FieldDescriptorRow pFDRow, RowCollection sampleData)
          Checks to see the probability that sample data containing the column for the given FieldDescriptor contains a URLReferenceField.
 boolean isOpenInNewWindow()
          Check to see if this URL Reference should open in a new window.
 boolean isURLEncodingNeeded(ExecutingContext ec)
          Tests if the URL need to be encoded so that chars with special meaning like spaces and pound signs are replaced with encoded versions.
 void setLinkStyleClass(java.lang.String style)
          Sets the HTML style class for the link
 void setNewWindowProperties(java.lang.String target)
          Sets the properties of the window to open the link's target in.
 void setNewWindowTarget(java.lang.String target)
          Sets the name of the window to open the link's target in.
 void setURLEncodingNeeded(boolean encodingNeeded)
          Sets if the URL need to be encoded so that chars with special meaning like spaces and pound signs are replaced with encoded versions.
 void setURLPrefix(java.lang.String uRLPrefix)
          Sets the prefix which is prepended to this field's URL.
 
Methods inherited from class planetj.database.field.StringField
createObject, getCSVField, getExternalValidationKey, getValueAsBoolean, isNumber, isString, isValidLength, isValueEqual, setValue
 
Methods inherited from class planetj.database.field.StringOrNumberField
correctValue, getCopiedValue, getDefaultDatabaseValue, getSQLValue, isValueEqual, isValueGreaterThan, isValueLessThan
 
Methods inherited from class planetj.database.Field
addFieldClassForDataClass, addPropertyChangeListener, appendSQLColumnDefinition, appendSQLNameAndValue, appendSQLNameAndValue, clearTable, clearValidationExceptions, clearValue, cloneFD, cloneField, commitValue, concat, correctSQLLiteral, create, create, createAction, createFromDataType, createInternal, divide, equals, executeGetterMethod, executeSetterMethod, firePropertyChange, getActionDefaultLocation, getActionDescriptor, getActionRequest, getActionRequest, getActions, getAssociationOperation, getAttribute, getAutoUpdateValue, getBackgroundColor, getBackgroundColor, getColumnSpan, getConfigProperty, getCSVDisplayField, getCurrentValue, getCurrentValueAsString, getDataSQLOperation, getDate, getDefaultExternalName, getDefaultUsageId, getDefaultValue, getDisplayComponent, getDisplayHeight, getDisplayLength, getDisplayOrder, getDisplayValue, getDisplayWidth, getExternalName, getFDFData, getFieldClassForDataClass, getFieldClassParameters, getFieldDescriptor, getFieldDescriptorSource, getFieldHandledActionNames, getFieldIncrementor, getFieldSetName, getFormatter, getHorizontalAlignment, getIndex, getLibrary, getLibraryName, getMaxLength, getMaxLength, getMetaDataSystemAlias, getName, getOldValue, getOldValueAsString, getPDFValue, getPossibleValueClass, getPossibleValues, getPossibleValues, getPossibleValuesKey, getPossibleValuesOperation, getPossibleValuesSQLOperation, getPreferredDisplayLength, getPreferredJavaDataType, getPVPage, getRow, getSearchDefaultValue, getSecuredTypeId, getSecuredTypeName, getSecurityType, getSQLColumnDefinition, getSQLColumnDefinition, getSQLNameAndDefaultValue, getSQLNameAndValue, getSQLNameAndValue, getSQLNullValue, getSQLObject, getSQLType, getSQLType, getSQLTypeName, getSQLTypeName, getSQLValue, getSQLValue, getStaticAttribute, getStaticAttributes, getStatusChange, getStyleClass, getStyleClass, getSystem, getSystemAlias, getSystemURL, getTable, getTableName, getUsageId, getUsageId, getUsageIds, getValidationExceptions, getValidationInvalidLengthString, getValidationInvalidMinLengthString, getValidationInvalidValueString, getValidationInvalidValueString, getValidationRequiredString, getValidValuesString, getValue, getValueAsByte, getValueAsDate, getValueAsDouble, getValueAsFloat, getValueAsFullLengthString, getValueAsInt, getValueAsLong, getValueAsNumber, getValueAsShort, getValueAsString, getXMLData, getXMLTag, handleAction, handlePossibleValueOperation, hasAssociationOperation, hasMultipleStyleClasses, hasOldValue, hasPossibleValuesKeyClassOrOp, hasPossibleValuesOperation, hasPossibleValuesOperation, hasUsageId, hasUsageId, hasValue, incrementValue, isActionApplicable, isApplicable, isAuthorizedForEdit, isAuthorizedForRead, isAutoIncrement, isAutoIncrementDatabaseDriven, isAutoIncrementWOWDriven, isAutoUpdateValue, isBoolean, isChanged, isContainsValue, isCurrentValueField, isCurrentValueString, isDate, isDecimalSQLType, isDecimalSQLType, isDefaultValue, isDerived, isDisplayable, isFieldContentDisplayable, isFieldValueDatabaseDefault, isFieldValueNotBlank, isFieldValueNull, isFieldValuePossibleValue, isFieldValuesEqual, isFileUpload, isGuarded, isHelpTextPresent, isInitialized, isNumeric, isNumericSQLType, isNumericSQLType, isPassword, isPhysical, isPossibleValuesSearch, isPrepareFieldValue, isReadOnly, isReadOnly, isReadOnlyOnSearch, isRequired, isRequired, isRequiredOnSearch, isSkeleton, isStatusChange, isStringSQLType, isStringSQLType, isTime, isTimestamp, isUpdateable, isValidationRequiredForAutoPopulate, isValidLength, isValidMinLength, isValidRequired, isValidRequired, isValidValue, isValidValue, isValueEqualToString, lessThan, removePropertyChangeListener, resetDisplayValue, rollbackChanges, setAttribute, setChanged, setClonedValues, setDate, setFieldContentDisplayable, setFieldDescriptor, setHasValue, setIndex, setInitialValue, setInitialValueAsString, setMaxLength, setName, setPVPage, setRow, setSavepoint, setSkeleton, setSQLType, setSQLTypeName, setStaticAttribute, setTable, setValue, setValue, setValueAsString, setValueToDefault, statusChanged, toString, toUpperCase, validate, validate, validate
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

URLReferenceField

public URLReferenceField()
Method Detail

getLinkStyleClass

public java.lang.String getLinkStyleClass()
Gets the HTML style class for the link


getNewWindowProperties

public java.lang.String getNewWindowProperties()
Gets the properties of the window to open the link's target in. This only applies if the target is being opened in a new window


getNewWindowTarget

public java.lang.String getNewWindowTarget()
Gets the name of the window to open the link's target in. This only applies if the target is being opened in a new window


getURL

public java.lang.String getURL(ExecutingContext ec)
                        throws CMException
Gets the URL for this URLReferenceField.

Throws:
CMException

getURLPrefix

public java.lang.String getURLPrefix(ExecutingContext ec)
Gets the prefix which is prepended to this field's URL. By default, the prefix is "http://"


getURLReference

protected java.lang.String getURLReference(ExecutingContext executingContext)
                                    throws CMException
Gets the unmodified URL for this URLReferenceField.

Throws:
CMException

guessFieldClassProbability

public static short guessFieldClassProbability(FieldDescriptorRow pFDRow,
                                               RowCollection sampleData)
Checks to see the probability that sample data containing the column for the given FieldDescriptor contains a URLReferenceField. This method takes an educated guess.


isOpenInNewWindow

public boolean isOpenInNewWindow()
Check to see if this URL Reference should open in a new window.


isURLEncodingNeeded

public boolean isURLEncodingNeeded(ExecutingContext ec)
Tests if the URL need to be encoded so that chars with special meaning like spaces and pound signs are replaced with encoded versions. If these chars are present in the link and you want them to stay there, this value should be set to false


setLinkStyleClass

public void setLinkStyleClass(java.lang.String style)
Sets the HTML style class for the link


setNewWindowProperties

public void setNewWindowProperties(java.lang.String target)
Sets the properties of the window to open the link's target in. This only applies if the target is being opened in a new window


setNewWindowTarget

public void setNewWindowTarget(java.lang.String target)
Sets the name of the window to open the link's target in. This only applies if the target is being opened in a new window


setURLEncodingNeeded

public void setURLEncodingNeeded(boolean encodingNeeded)
Sets if the URL need to be encoded so that chars with special meaning like spaces and pound signs are replaced with encoded versions. If these chars are present in the link and you want them to stay there, this value should be set to false


setURLPrefix

public void setURLPrefix(java.lang.String uRLPrefix)
Sets the prefix which is prepended to this field's URL. By default, the prefix is "http://"