Return-Path: Delivered-To: apmail-oodt-commits-archive@www.apache.org Received: (qmail 13321 invoked from network); 22 Feb 2011 18:52:01 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 22 Feb 2011 18:52:01 -0000 Received: (qmail 99084 invoked by uid 500); 22 Feb 2011 18:52:01 -0000 Delivered-To: apmail-oodt-commits-archive@oodt.apache.org Received: (qmail 99045 invoked by uid 500); 22 Feb 2011 18:52:00 -0000 Mailing-List: contact commits-help@oodt.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@oodt.apache.org Delivered-To: mailing list commits@oodt.apache.org Received: (qmail 99020 invoked by uid 99); 22 Feb 2011 18:51:59 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 22 Feb 2011 18:51:59 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 22 Feb 2011 18:51:58 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id 716461B2CED for ; Tue, 22 Feb 2011 18:51:38 +0000 (UTC) Date: Tue, 22 Feb 2011 18:51:38 +0000 (UTC) From: "Chris A. Mattmann (JIRA)" To: commits@oodt.apache.org Message-ID: <290847895.8936.1298400698460.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <255404720.8348.1298387978513.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] Commented: (OODT-147) Completely refactor TypeHandling code MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/OODT-147?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12997965#comment-12997965 ] Chris A. Mattmann commented on OODT-147: ---------------------------------------- Heh, the Element Name was *never* suppossed to be unique, hence the Element ID :) I'm fine with adding a method to getElementByName(String elementName, ProductType productType), but I'm not fine with removing the existing getElementByName(String elementName) function. That function should simply return the first (possibly only) occurrence of the Element with the given name per its original intended behavior. I think we're in agreement though! > Completely refactor TypeHandling code > -------------------------------------- > > Key: OODT-147 > URL: https://issues.apache.org/jira/browse/OODT-147 > Project: OODT > Issue Type: Improvement > Components: file manager > Affects Versions: 0.1-incubating, 0.2 > Environment: indep. of env. > Reporter: Chris A. Mattmann > Assignee: Chris A. Mattmann > Priority: Critical > Labels: file, handling, manager, oodt, type > Fix For: 0.3 > > > The o.a.oodt.cas.filemgr.structs.type.* package contains code originally intended to strongly type Metadata elements within CAS file manager. IOW, it was originally conceived to make declaring a type for an Element easy. Consider the un-typed CAS file manager policy below: > {code} > > .. > > {code} > which currently doesn't specify its type as a {noformat}Date{noformat} when it clearly is a {noformat}Date{noformat} element. > Type handling was supposed to take care of this. As it stands, there are a number of fundamental disconnects with type handling: > # There are absolutely 0 examples of how to use it. The existing example is not tailored for the general audience and does little to inform a user of what Type handling is supposed to do. > # Type handlers are attached to Product Type (repo manager) policy when instead they really should be a part of the Validation layer policy (i.e., elements.xml) > # Type handlers aren't configurable. > # There is no way to map a TypeHandler alias or name (e.g.., instead of having to declare the FQCN o.a.oodt.cas.filemgr.structs.type.DateTypeHandler, we should be able to specify DateType). > # The TypeHandler interface is dependent on a ProductType. > In order to address the above concerns I'm going to attach a patch that does the following: > # Moves type handler declarations to Validation layer policy (elements.xml). > # Refactors the TypeHandler interface to be configurable. > # Refactors the TypeHandler interface to be independent of ProductType. > # Allows for easy aliasing of TypeHandlers. > # By default assigns all default CAS elements that ship with the CAS file manager a default type. > # Adds a bunch more documentation. > # Adds unit tests. -- This message is automatically generated by JIRA. - For more information on JIRA, see: http://www.atlassian.com/software/jira