com.wewebu.ow.server.field
Class OwStandardEnum

java.lang.Object
  extended by com.wewebu.ow.server.field.OwStandardEnum
All Implemented Interfaces:
OwEnum

public class OwStandardEnum
extends Object
implements OwEnum

Standard implementation of the OwEnum interface.

Alfresco Workdesk
Copyright (c) Alfresco Software, Inc.
All rights reserved.

For licensing information read the license.txt file or
go to: http://wiki.alfresco.com


Constructor Summary
OwStandardEnum(Object value_p, String strSymbolName_p)
          construct a single enum value, used in getEnums Use this constructor if you got already a localized displayname.
OwStandardEnum(Object value_p, String label_p, String localizeKey_p)
          Constructor to create an enumeration entry with a predefined localization key.
 
Method Summary
 OwEnumCollection getChilds()
          get the contained child collection
 String getDisplayName(Locale local_p)
          get a display name
 String getLocalizeKey()
          Returns the localize key of this enumeration entry.
 Object getValue()
          get the enum value
 boolean hasChildEnums()
          check if enum has a contained child collection
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OwStandardEnum

public OwStandardEnum(Object value_p,
                      String strSymbolName_p)
construct a single enum value, used in getEnums Use this constructor if you got already a localized displayname. However, getDisplayName locale must match the given locale here.

Parameters:
value_p - Object enum value
strSymbolName_p - String symbol name to be translated

OwStandardEnum

public OwStandardEnum(Object value_p,
                      String label_p,
                      String localizeKey_p)
Constructor to create an enumeration entry with a predefined localization key.

Parameters:
value_p - Object the native value
label_p - String representing the default label
localizeKey_p - String localization key without owlable. prefix
Since:
2.5.3.1
Method Detail

getValue

public Object getValue()
Description copied from interface: OwEnum
get the enum value

Specified by:
getValue in interface OwEnum

getDisplayName

public String getDisplayName(Locale local_p)
Description copied from interface: OwEnum
get a display name

Specified by:
getDisplayName in interface OwEnum

hasChildEnums

public boolean hasChildEnums()
check if enum has a contained child collection

Specified by:
hasChildEnums in interface OwEnum

getChilds

public OwEnumCollection getChilds()
get the contained child collection

Specified by:
getChilds in interface OwEnum
Returns:
OwEnumCollection or null if item has no children

getLocalizeKey

public String getLocalizeKey()
Returns the localize key of this enumeration entry. Remember it will be without the "owlabel." prefix.

Returns:
String the localize key
Since:
3.0.0.1


Copyright © 2013 Alfresco Business Solutions. All Rights Reserved.