com.centrasite.control.discovery
Class AbstractPropertyAccessor

java.lang.Object
  extended by com.centrasite.control.discovery.AbstractPropertyAccessor
All Implemented Interfaces:
PropertyAccessor
Direct Known Subclasses:
ReadOnlyPropertyAccessor, ReadWritePropertyAccessor

public abstract class AbstractPropertyAccessor
extends java.lang.Object
implements PropertyAccessor


Constructor Summary
AbstractPropertyAccessor()
           
 
Method Summary
 void editProperty(Item item, ActionContext actionContext, MultipleValueInputActionListener listener)
          Invoke editor for property
 java.lang.String getActivatingMessage(java.util.Locale locale)
          Get a localized message, which will displayed when this PropertyAccessor is activated in the Column Chooser
 java.util.List getCommands(Item item)
          Get list of commands associated with respective property.
 java.lang.String getDescription(java.util.Locale locale)
          Obtain a description which can be used by a tool tip for example
 java.lang.String getDisplayName(java.util.Locale locale)
          Obtain a localized display name for the property accessed using this PropertyAccessor
 Item getReferencedItem(Item item)
          Get the Item referenced by this property
 SelectItemDescriptor getSelectReferencedItemDescriptor(Item item)
          Provide context description for selecting referenced item
 boolean isComplexProperty()
          Check whether property is complex May be due to referenced item
 boolean isDateProperty()
          Returns the current accessor is having date value or not
 boolean isIntProperty()
          Returns the current accessor is having number value or not
 boolean isTextEditAllowed(Item item)
          Check whether property value may be edited directly (that is as a string)
 void selectReferencedItem(Item item, ActionContext actionContext)
          Invoke editor for property
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.centrasite.control.discovery.PropertyAccessor
getPropertyName, getValue, isReadOnly, setValue
 

Constructor Detail

AbstractPropertyAccessor

public AbstractPropertyAccessor()
Method Detail

getDisplayName

public java.lang.String getDisplayName(java.util.Locale locale)
Obtain a localized display name for the property accessed using this PropertyAccessor

Specified by:
getDisplayName in interface PropertyAccessor
Returns:
the localized display name

getDescription

public java.lang.String getDescription(java.util.Locale locale)
Obtain a description which can be used by a tool tip for example

Specified by:
getDescription in interface PropertyAccessor
Returns:
a localized string of null, if no tool tip to be displayed

isComplexProperty

public boolean isComplexProperty()
Check whether property is complex May be due to referenced item

Specified by:
isComplexProperty in interface PropertyAccessor

getSelectReferencedItemDescriptor

public SelectItemDescriptor getSelectReferencedItemDescriptor(Item item)
Provide context description for selecting referenced item

Specified by:
getSelectReferencedItemDescriptor in interface PropertyAccessor

getReferencedItem

public Item getReferencedItem(Item item)
Get the Item referenced by this property

Specified by:
getReferencedItem in interface PropertyAccessor
Parameters:
item - the current Item
Returns:
the referenced Item; null, if none

isTextEditAllowed

public boolean isTextEditAllowed(Item item)
Check whether property value may be edited directly (that is as a string)

Specified by:
isTextEditAllowed in interface PropertyAccessor
Parameters:
item - the current Item

selectReferencedItem

public void selectReferencedItem(Item item,
                                 ActionContext actionContext)
Invoke editor for property

Specified by:
selectReferencedItem in interface PropertyAccessor

editProperty

public void editProperty(Item item,
                         ActionContext actionContext,
                         MultipleValueInputActionListener listener)
Invoke editor for property

Specified by:
editProperty in interface PropertyAccessor

getCommands

public java.util.List getCommands(Item item)
Description copied from interface: PropertyAccessor
Get list of commands associated with respective property. These commands may e.g. be rendered in the "General" tab in a detail view.

Specified by:
getCommands in interface PropertyAccessor
Returns:
the list of commands available for this property

getActivatingMessage

public java.lang.String getActivatingMessage(java.util.Locale locale)
Get a localized message, which will displayed when this PropertyAccessor is activated in the Column Chooser

Specified by:
getActivatingMessage in interface PropertyAccessor
Returns:
The localized message

isDateProperty

public boolean isDateProperty()
Description copied from interface: PropertyAccessor
Returns the current accessor is having date value or not

Specified by:
isDateProperty in interface PropertyAccessor

isIntProperty

public boolean isIntProperty()
Description copied from interface: PropertyAccessor
Returns the current accessor is having number value or not

Specified by:
isIntProperty in interface PropertyAccessor