]> source.dussan.org Git - vaadin-framework.git/commitdiff
Moving #763 related changes to development branch 763_ATF_PID, these are merged back...
authorJani Laakso <jani.laakso@itmill.com>
Thu, 31 May 2007 15:06:18 +0000 (15:06 +0000)
committerJani Laakso <jani.laakso@itmill.com>
Thu, 31 May 2007 15:06:18 +0000 (15:06 +0000)
svn changeset:1544/svn branch:trunk

src/com/itmill/toolkit/terminal/Identifiable.java [deleted file]
src/com/itmill/toolkit/terminal/web/AjaxApplicationManager.java
src/com/itmill/toolkit/ui/AbstractComponent.java
src/com/itmill/toolkit/ui/CustomComponent.java

diff --git a/src/com/itmill/toolkit/terminal/Identifiable.java b/src/com/itmill/toolkit/terminal/Identifiable.java
deleted file mode 100644 (file)
index 706b974..0000000
+++ /dev/null
@@ -1,96 +0,0 @@
-/* *************************************************************************
- IT Mill Toolkit 
-
- Development of Browser User Interfaces Made Easy
-
- Copyright (C) 2000-2006 IT Mill Ltd
- *************************************************************************
-
- This product is distributed under commercial license that can be found
- from the product package on license.pdf. Use of this product might 
- require purchasing a commercial license from IT Mill Ltd. For guidelines 
- on usage, see licensing-guidelines.html
-
- *************************************************************************
- For more information, contact:
- IT Mill Ltd                           phone: +358 2 4802 7180
- Ruukinkatu 2-4                        fax:   +358 2 4802 7181
- 20540, Turku                          email:  info@itmill.com
- Finland                               company www: www.itmill.com
- Primary source for information and releases: www.itmill.com
-
- ********************************************************************** */
-
-package com.itmill.toolkit.terminal;
-
-import java.util.regex.Pattern;
-
-/**
- * <p>
- * Interface implemented by all classes that can be identified by Unique User
- * Interface Identity (UUID). By default paintable ID's (PIDs) for all UI
- * components are generated with a growing sequence number starting from 0. PIDs
- * are unique but they are created when UI component is rendered to terminal and
- * therefore PIDs may change between subsequent application or session
- * initializations. Classes implementing this interface may set fixed PIDs for
- * any UI component.
- * </p>
- * 
- * @author IT Mill Ltd.
- * @version
- * @VERSION@
- * @since 4.1.0
- */
-public class Identifiable {
-
-       /**
-        * Unique user interface identifier (UUID)
-        */
-       private String UIID = null;
-
-       /**
-        * Valid UUID pattern
-        */
-       private static Pattern validPattern = Pattern.compile("[a-zA-Z0-9_]{1,32}");
-
-       /**
-        * Set unique user interface identifier (UUID). This must be unique identity
-        * string consisting of characters 0-9, a-Z and _ and it's length must be
-        * from 1 to 32.
-        * 
-        */
-       public void setUIID(String UIID) {
-
-               // check for valid characters
-               if (!((validPattern.matcher(UIID)).matches())) {
-                       String errMsg = "Ignored setUUID for " + this.getClass()
-                                       + " because of invalid value [" + UIID + "], ";
-                       if ((UIID.length() < 1) || (UIID.length() > 32)) {
-                               // TODO change this: warn of invalid UUID
-                               errMsg += "length must be from 1 to 32.";
-                       } else {
-                               errMsg += "invalid characters used.";
-                       }
-                       // TODO change this: warn of invalid UUID
-                       System.err.println(errMsg);
-                       // ignore UUID setting
-                       return;
-               }
-
-               this.UIID = UIID;
-       }
-
-       /**
-        * Get unique user interface identifier (UUID)
-        * 
-        */
-       public String getUIID() {
-               return UIID;
-       }
-
-}
index bacda812367a5f27524feb5cfaa6df68c5877c8c..298b95d2ca0b544530113a9d5aafb160336c6033 100644 (file)
@@ -54,7 +54,6 @@ import com.itmill.toolkit.Application;
 import com.itmill.toolkit.Application.WindowAttachEvent;
 import com.itmill.toolkit.Application.WindowDetachEvent;
 import com.itmill.toolkit.terminal.DownloadStream;
-import com.itmill.toolkit.terminal.Identifiable;
 import com.itmill.toolkit.terminal.Paintable;
 import com.itmill.toolkit.terminal.URIHandler;
 import com.itmill.toolkit.terminal.Paintable.RepaintRequestEvent;
@@ -592,18 +591,9 @@ public class AjaxApplicationManager implements
        public synchronized String getPaintableId(Paintable paintable) {
 
                String id = (String) paintableIdMap.get(paintable);
-               if (id == null) {
-                       String UIID = null;
-                       // try to get PID using unique user interface identity (UUID)
-                       if (paintable instanceof Identifiable)
-                               UIID = ((Identifiable) paintable).getUIID();
-                       if (UIID != null)
-                               id = "PID" + UIID;
-                       else {
-                               // UUID not set, get PID using growing sequence number
-                               id = "PID" + Integer.toString(idSequence++);
-                       }
-               }
+               if (id == null)
+                       // get PID using growing sequence number
+                       id = "PID" + Integer.toString(idSequence++);
                paintableIdMap.put(paintable, id);
 
                return id;
index 91d6465d47246649613e311b43a5c4f20e272edc..6c453d0a571de82030f23fbae97f3ce80f394033 100644 (file)
@@ -52,8 +52,7 @@ import java.lang.reflect.Method;
  * @VERSION@
  * @since 3.0
  */
-public abstract class AbstractComponent extends Identifiable implements
-               Component, MethodEventSource {
+public abstract class AbstractComponent implements Component, MethodEventSource {
 
        /* Private members ************************************************* */
 
@@ -920,5 +919,4 @@ public abstract class AbstractComponent extends Identifiable implements
        public Object getData() {
                return this.applicationData;
        }
-
 }
\ No newline at end of file
index ddbbfcc07a1a482534d8479d1301286d176af097..3aebcfeb6bd12b84ea031aded73bedee27323243 100644 (file)
@@ -36,7 +36,6 @@ import java.util.Map;
 import java.util.Set;
 
 import com.itmill.toolkit.Application;
-import com.itmill.toolkit.terminal.Identifiable;
 import com.itmill.toolkit.terminal.PaintException;
 import com.itmill.toolkit.terminal.PaintTarget;
 import com.itmill.toolkit.terminal.Resource;
@@ -56,7 +55,7 @@ import com.itmill.toolkit.terminal.VariableOwner;
  * @VERSION@
  * @since 3.0
  */
-public class CustomComponent extends Identifiable implements Component {
+public class CustomComponent implements Component {
 
        /**
         * The root component implementing the custom component.