org.apache.directory.mitosis.configuration
Class ReplicaIdPropertyEditor

java.lang.Object
  extended by java.beans.PropertyEditorSupport
      extended by org.apache.directory.mitosis.configuration.ReplicaIdPropertyEditor
All Implemented Interfaces:
java.beans.PropertyEditor

public class ReplicaIdPropertyEditor
extends java.beans.PropertyEditorSupport

A PropertyEditor that converts strings into ReplicaIds and vice versa.

Version:
$Rev: 95 $, $Date: 2006-09-16 13:04:28 +0200 (Sat, 16 Sep 2006) $
Author:
The Apache Directory Project (dev@directory.apache.org)

Constructor Summary
ReplicaIdPropertyEditor()
           
ReplicaIdPropertyEditor(java.lang.Object source)
           
 
Method Summary
static boolean check(java.lang.String id)
          Check a new instance of ReplicaId.
 java.lang.String getAsText()
           
 void setAsText(java.lang.String text)
           
 
Methods inherited from class java.beans.PropertyEditorSupport
addPropertyChangeListener, firePropertyChange, getCustomEditor, getJavaInitializationString, getSource, getTags, getValue, isPaintable, paintValue, removePropertyChangeListener, setSource, setValue, supportsCustomEditor
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ReplicaIdPropertyEditor

public ReplicaIdPropertyEditor()

ReplicaIdPropertyEditor

public ReplicaIdPropertyEditor(java.lang.Object source)
Method Detail

check

public static boolean check(java.lang.String id)
Check a new instance of ReplicaId. The id must be a String which respect the pattern : [-_a-zA-Z0-9]* and must be between 1 and 16 chars length

Parameters:
id - The replica to check
Returns:
true if the replicaId is well formed

getAsText

public java.lang.String getAsText()
Specified by:
getAsText in interface java.beans.PropertyEditor
Overrides:
getAsText in class java.beans.PropertyEditorSupport

setAsText

public void setAsText(java.lang.String text)
               throws java.lang.IllegalArgumentException
Specified by:
setAsText in interface java.beans.PropertyEditor
Overrides:
setAsText in class java.beans.PropertyEditorSupport
Throws:
java.lang.IllegalArgumentException


Copyright © 2003-2009 Apache Software Foundation. All Rights Reserved.