~ubuntu-branches/ubuntu/maverick/eucalyptus/maverick

« back to all changes in this revision

Viewing changes to clc/modules/msgs/src/main/java/com/eucalyptus/configurable/AbstractConfigurableProperty.java

  • Committer: Bazaar Package Importer
  • Author(s): Dave Walker (Daviey)
  • Date: 2010-07-21 17:27:10 UTC
  • mfrom: (1.1.38 upstream)
  • Revision ID: james.westby@ubuntu.com-20100721172710-7xv07dmdqgivc3t9
Tags: 2.0~bzr1211-0ubuntu1
* New major upstream version merge, 2.0 (r1211).
* debian/patches/:
  - 01-wsdl-stubs.patch, debian/wsdl.md5sums: wsdl stubs updated.
  - 02-Makefile.patch: Updated to reflect new code layout.
  - 07-local_support_euca_conf-in.patch: Updated to reflect new code layout.
  - 08-ubuntu-default-networking.patch: Refreshed.
  - 09-small-128-192MB.patch: Updated to point to new location.
  - 10-disable-iscsi.patch: Refreshed.
  - 11-state-cleanup-memleakfix.patch: Removed, fixed upstream.
  - 15-fix-default-ramdisk.patch: Updated to point to new location.
  - 16-kvm_libvirt_xml_default_use_kvm.patch: Updated to reflect changes.
  - 17-fix_walrus_OOM_errors.patch: Removed, fixed upstream.
  - 18-priv_security.patch: Updated to reflect upstream changes.
  - 20-brute-force-webui.patch: Updated to reflect upstream changes. 
  - 21-eucalyptus-1.7-with-gwt-1.6.4.patch: New patch, allows 
    eucalyptus-1.7 to be built against gwt 1.6.4. Based on patch courtesy 
    of Dmitrii Zagorodnov, upstream. (LP: #597330)
* debian/eucalyptus-java-common.links: 
  - Changed symlink for groovy, point to groovy.all.jar, making compatiable 
    with groovy versions >1.7. (LP: #595421)
  - Added ant.jar & jetty-rewrite-handler.jar as they are now required.
* debian/control
  - & debian/build-jars: Added libjavassist-java and libjetty-extra-java as 
    build dependencies.
  - Added libjetty-extra-java as a dependency of eucalyptus-java-common
* The binary resulting jar's have been renamed from eucalyptus-*-1.6.2.jar
  to eucalyptus-*-main.jar:    
  - debian/eucalyptus-cc.upstart
  - debian/eucalyptus-cloud.install
  - debian/eucalyptus-common.eucalyptus.upstart
  - debian/eucalyptus-java-common.install
  - debian/eucalyptus-network.upstart
  - debian/eucalyptus-sc.install
  - debian/eucalyptus-walrus.install
* debian/eucalyptus-java-common.install: New upstream jars that have been
  installed:
  - eucalyptus-db-hsqldb-ext-main.jar
  - eucalyptus-component-main.jar
* debian/control:
  - Updated Standards Version to 3.8.4 (no change)
  - Updated the upstream Homepage to: http://open.eucalyptus.com/
  - Changed Vcs-Bzr to reflect new location of Ubuntu hosted development branch.
  - Made the Build Dependency of groovy and the binary eucalyptus-java-common
    package depend on version >=1.7.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
package com.eucalyptus.configurable;
 
2
 
 
3
import org.apache.log4j.Logger;
 
4
import com.eucalyptus.configurable.PropertyDirectory.NoopEventListener;
 
5
import com.eucalyptus.event.PassiveEventListener;
 
6
 
 
7
public abstract class AbstractConfigurableProperty implements ConfigurableProperty {
 
8
 
 
9
  private static Logger LOG = Logger.getLogger( AbstractConfigurableProperty.class );
 
10
  protected String entrySetName;
 
11
  private String fieldName;
 
12
  protected String qualifiedName;
 
13
  protected String description;
 
14
  protected PropertyTypeParser typeParser;
 
15
  protected String defaultValue;
 
16
  protected Class definingClass;
 
17
  protected Boolean readOnly;
 
18
  protected String displayName;
 
19
  protected ConfigurableFieldType widgetType;
 
20
  protected String alias;
 
21
  private PassiveEventListener<ConfigurableProperty> changeListener;
 
22
  
 
23
  public AbstractConfigurableProperty( Class definingClass, String entrySetName, String propertyName, String defaultValue, String description, PropertyTypeParser typeParser, Boolean readOnly, String displayName, ConfigurableFieldType widgetType, String alias, PassiveEventListener changeListener ) {
 
24
    this( definingClass, entrySetName, propertyName, defaultValue, description, typeParser, readOnly, displayName, widgetType, alias );
 
25
    this.changeListener = changeListener;
 
26
  }
 
27
  public AbstractConfigurableProperty( Class definingClass, String entrySetName, String propertyName, String defaultValue, String description, PropertyTypeParser typeParser, Boolean readOnly, String displayName, ConfigurableFieldType widgetType, String alias ) {
 
28
    this.definingClass = definingClass;
 
29
    this.entrySetName = entrySetName.toLowerCase( );
 
30
    this.fieldName = propertyName.toLowerCase( );
 
31
    this.qualifiedName = this.entrySetName + "." + this.fieldName;
 
32
    this.description = description;
 
33
    this.typeParser = typeParser;
 
34
    this.defaultValue = defaultValue;
 
35
    this.readOnly = readOnly;
 
36
    this.displayName = displayName;
 
37
    this.widgetType = widgetType;
 
38
    this.alias = alias;
 
39
    this.changeListener = NoopEventListener.NOOP;
 
40
  }
 
41
 
 
42
  public String getFieldName( ) {
 
43
    return this.fieldName;
 
44
  }
 
45
 
 
46
  public String getEntrySetName( ) {
 
47
    return this.entrySetName;
 
48
  }
 
49
 
 
50
  public String getQualifiedName( ) {
 
51
    return this.qualifiedName;
 
52
  }
 
53
 
 
54
  public String getDescription( ) {
 
55
    return this.description;
 
56
  }
 
57
 
 
58
  public PropertyTypeParser getTypeParser( ) {
 
59
    return this.typeParser;
 
60
  }
 
61
 
 
62
  public String getDefaultValue( ) {
 
63
    return this.defaultValue;
 
64
  }
 
65
 
 
66
  public abstract String getValue( );
 
67
 
 
68
  public abstract String setValue( String s );
 
69
 
 
70
  public void resetValue( ) {
 
71
    this.setValue( this.defaultValue );
 
72
  }
 
73
 
 
74
  public Class getDefiningClass( ) {
 
75
    return this.definingClass;
 
76
  }
 
77
  
 
78
  public String getDisplayName( ) {
 
79
        return this.displayName;
 
80
  }
 
81
  
 
82
  public ConfigurableFieldType getWidgetType( ) {
 
83
        return this.widgetType;
 
84
  }
 
85
  
 
86
  public String getAlias() {
 
87
        return this.alias;
 
88
  }
 
89
  
 
90
  public void fireChange() {
 
91
    if( !NoopEventListener.class.equals( this.changeListener.getClass( ) ) ) {
 
92
      this.changeListener.firingEvent( this );
 
93
    }
 
94
  }
 
95
}
 
 
b'\\ No newline at end of file'