[Join-cvs] join1/src/main/org/figure8/join/businessobjects/artifact DeliverableType.java, 1.3, 1.4
Brought to you by:
lbroudoux
|
From: Laurent B. <lbr...@us...> - 2008-07-24 23:49:30
|
Update of /cvsroot/join/join1/src/main/org/figure8/join/businessobjects/artifact In directory sc8-pr-cvs17.sourceforge.net:/tmp/cvs-serv4372/businessobjects/artifact Modified Files: DeliverableType.java Log Message: Fix for issue #1991593 : add a check on class emptiness Index: DeliverableType.java =================================================================== RCS file: /cvsroot/join/join1/src/main/org/figure8/join/businessobjects/artifact/DeliverableType.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** DeliverableType.java 3 Jul 2006 18:34:16 -0000 1.3 --- DeliverableType.java 24 Jul 2008 23:49:22 -0000 1.4 *************** *** 1,352 **** ! /** ! * Copyright 2005-2006 the original author or authors. ! * ! * Licensed under the Gnu General Pubic License, Version 2.0 (the ! * "License"); you may not use this file except in compliance with ! * the License. You may obtain a copy of the License at ! * ! * http://www.opensource.org/licenses/gpl-license.php ! * ! * This program is distributed in the hope that it will be useful, ! * but WITHOUT ANY WARRANTY; without even the implied warranty of ! * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. ! * See the Gnu General Public License for more details. ! */ ! package org.figure8.join.businessobjects.artifact; ! ! import org.figure8.join.core.SortableEntityObject; ! import org.figure8.join.core.InvalidParameterException; ! import org.figure8.join.services.vcs.VCSAccessor; ! import org.figure8.join.util.LogUtil; ! ! import org.apache.commons.logging.Log; ! ! import java.text.MessageFormat; ! /** ! * Entity object representing a deliverable type. Such a type helps ! * categorizing work deliveries done and managed through Join application. ! * <br/> ! * A deliverable type will help by knowing how to generate unique keys for ! * deliverable artifacts. (see the <code>generateDeliverableKey()</code> method) ! * <br/> ! * It is also a handler for all the connection informations to the ! * underlying Versionning and Configuration System ; in the case such a ! * system is used for retrieving deliverables. (see the <code>getVCSAccessor()</code> ! * method) ! * @author <a href="mailto:lau...@fr...">Laurent Broudoux</a> ! * @version $Revision$ ! * ! * @see org.figure8.join.services.vcs.VCSAccessor ! * ! * @hibernate.class table="join_deltypes" ! * @hibernate.cache usage="read-write" ! * ! * @hibernate.query name="join.deltype_findByKey" query="from DeliverableType type where type.key = :typeKey" ! */ ! public class DeliverableType extends SortableEntityObject{ ! ! // Static ------------------------------------------------------------------- ! ! /** Get a commons logger. */ ! private static final Log log = LogUtil.getLog(DeliverableType.class); ! ! ! // Attributes --------------------------------------------------------------- ! ! /** The deliverable type key */ ! private String key; ! /** The deliverable type label */ ! private String label; ! /** The deliverable type keyTemplate */ ! private String keyTemplate; ! /** The deliverable type is versionnable */ ! private boolean versionable; ! /** The deliverable type is mandatory */ ! private boolean mandatory; ! /** The deliverable type use version and configuration system */ ! private boolean vcsDeliverable = false; ! ! /** User for connecting to the version and configuration system */ ! private String vcsUser; ! /** Password for connecting to the version and configuration system */ ! private String vcsPassword; ! /** The root of the version and configuration system */ ! private String vcsRoot; ! /** The module of the version and configuration system */ ! private String vcsModule; ! /** The accessor class name for the version and configuration system */ ! private String vcsAccessorClass; ! ! /** The template object for generating deliverable keys */ ! private MessageFormat template = null; ! /** The VCS accessor instance of type <b>vcsAccessorClass</b> */ ! private VCSAccessor vcsAccessor = null; ! ! ! // Constructors ------------------------------------------------------------- ! ! /** Creates a new instance of DeliverableType */ ! public DeliverableType(){ ! } ! ! /** ! * Creates a new instance of DeliverableType with mandatory attributes ! * @param key The instance unique key ! * @param label The type instance label ! * @param keyTemplate The deliverable type template for key generation ! * @param versionable Wether deliverables should appear in versions ! * @param mandatory Wether deliverables are mandatory in version composition ! * @see org.figure8.join.businessobjects.artifact.Assembly ! */ ! public DeliverableType(String key, String label, String keyTemplate, boolean versionable, boolean mandatory){ ! this.key = key; ! this.label = label; ! this.keyTemplate = keyTemplate; ! this.versionable = versionable; ! this.mandatory = mandatory; ! } ! ! ! // Public ------------------------------------------------------------------- ! ! /** ! * @hibernate.property column="s_key" ! * length="10" not-null="true" ! * unique="true" update="false" ! * @return This deliverable type key ! */ ! public String getKey(){ ! return key; ! } ! /** @param key This type unique key */ ! public void setKey(String key){ ! this.key = key; ! } ! ! /** ! * @hibernate.property column="s_label" ! * length="40" not-null="true" ! * unique="true" ! * @return This type label for display ! */ ! public String getLabel(){ ! return label; ! } ! /** @param label This deliverable type label */ ! public void setLabel(String label){ ! this.label = label; ! } ! ! /** ! * @hibernate.property column="s_keytemplate" ! * length="40" not-null="true" ! * unique="true" ! * @return The template used for generating deliverable keys ! */ ! public String getKeyTemplate(){ ! return keyTemplate; ! } ! /** ! * The template used for deliverables key generation. This template ! * should be a string representing a <code>MessageFormat</code> with ! * 2 arguments. (ex: myDeliverable_r{0}_v{1}) ! * @param keyTemplate MessageFormat template ! * @see java.text.MessageFormat ! */ ! public void setKeyTemplate(String keyTemplate){ ! this.keyTemplate = keyTemplate; ! } ! ! /** ! * @hibernate.property column="b_versionable" ! * type="boolean" not-null="true" ! * @return true if deliverables of this type should be used for ! * composing a <code>Assembly</code> ! * @see org.figure8.join.businessobjects.artifact.Assembly ! */ ! public boolean getVersionable(){ ! return versionable; ! } ! /** @param versionable Wether deliverables are used for composing <code>Versions</code> */ ! public void setVersionable(boolean versionable){ ! this.versionable = versionable; ! } ! ! /** ! * @hibernate.property column="b_mandatory" ! * type="boolean" not-null="true" ! * @return true if deliverables of this type are mandatory when ! * used for composing a <code>Assembly</code> ! * @see org.figure8.join.businessobjects.artifact.Assembly ! */ ! public boolean getMandatory(){ ! return mandatory; ! } ! /** @param mandatory Wether deliverables are mandatory whe composing <code>Versions</code> */ ! public void setMandatory(boolean mandatory){ ! this.mandatory = mandatory; ! } ! ! /** ! * @hibernate.property column="b_vcsdeliverable" ! * type="boolean" not-null="true" ! * @return true if deliverables of this type are retrieved using ! * a version and configuration system (such as CVS, Subversion, ...) ! */ ! public boolean getVcsDeliverable(){ ! return vcsDeliverable; ! } ! /** @param vcsDeliverable Wether deliverables are retrieved using a version and configuration system */ ! public void setVcsDeliverable(boolean vcsDeliverable){ ! this.vcsDeliverable = vcsDeliverable; ! } ! ! /** ! * @hibernate.property column="s_vcsuser" length="30" ! * @return The user for connecting to version and configuration system ! */ ! public String getVcsUser(){ ! return vcsUser; ! } ! /** @param vcsUser The user for connecting to VCS */ ! public void setVcsUser(String vcsUser){ ! this.vcsUser = vcsUser; ! } ! ! /** ! * @hibernate.property column="s_vcspassword" length="30" ! * @return The password for connecting to version and configuration system ! */ ! public String getVcsPassword(){ ! return vcsPassword; ! } ! /** @param vcsPassword The password for connection to VCS */ ! public void setVcsPassword(String vcsPassword){ ! this.vcsPassword = vcsPassword; ! } ! ! /** ! * @hibernate.property column="s_vcsroot" length="100" ! * @return The root of version and configuration system used (might be a CVS root, a Subversion Url, etc ...) ! */ ! public String getVcsRoot(){ ! return vcsRoot; ! } ! /** @param vcsRoot The root of VCS used (CVS root, SVN Url, ...) */ ! public void setVcsRoot(String vcsRoot){ ! this.vcsRoot = vcsRoot; ! } ! ! /** ! * @hibernate.property column="s_vcsmodule" length="40" ! * @return Name of module corresponding to deliverables in VCS (CVS module, "trunk" for Subversion, etc ..) ! */ ! public String getVcsModule(){ ! return vcsModule; ! } ! /** @param vcsModule Name of module corresponding to deliverables in VCS */ ! public void setVcsModule(String vcsModule){ ! this.vcsModule = vcsModule; ! } ! ! /** ! * @hibernate.property column="s_vcsaccessorclass" length="200" ! * @return The FQN of the Java class used for connecting version and ! * configuration system corresponding to this type ! */ ! public String getVcsAccessorClass(){ ! return vcsAccessorClass; ! } ! /** ! * Assign a VCS implementation to this deliverable type. ie : an helper object that allows ! * to connect to the version and configuration system used for retrieving deliverables of ! * this type. This parameter must be the name of the Java class that implements ! * <code>org.figure8.join.services.vcs.VCSAccessor</code> ! * @param vcsAccessorClass FQN of Java class ! * @throws org.figure8.join.core.InvalidParameterException if the <b>vcsImplementationClass</b> is not valid ! */ ! public void setVcsAccessorClass(String vcsAccessorClass) throws InvalidParameterException{ ! this.vcsAccessorClass = vcsAccessorClass; ! // Try instantiating VCS accessor now. ! instantiateVCSAccessor(); ! } ! ! /** ! * Get the <code>VCSAccessor</code> associated to this type (if any). The returned accessor ! * is "ready to use" : it has been initialized with corret properties. ! * @throws InvalidParameterException if the <b>vcsAccessorClass</b> inner field is not valid ! * @return The accessor instance or null if no accessor is associated to this role ! */ ! public VCSAccessor getVCSAccessor() throws InvalidParameterException{ ! // Only available if deliverable trough VCS and if there's a accessor defined. ! if (vcsDeliverable && vcsAccessorClass != null){ ! // Instantiate if not already done. ! if (vcsAccessor == null) ! instantiateVCSAccessor(); ! // Set vcs accessor fields. ! vcsAccessor.setUser(vcsUser); ! vcsAccessor.setPassword(vcsPassword); ! vcsAccessor.setModule(vcsModule); ! vcsAccessor.setRootRepository(vcsRoot); ! // Ok. ! return vcsAccessor; ! } ! return null; ! } ! ! /** ! * Generate a unique key for a deliverable. Such a key has to be unique as ! * specified by the <code>Artifact</code>. So this implementation is using ! * the given <b>keyTemplate</b> as a java.text.MessageFormat using 2 arguments ! * that are the deliverable release name (unique for a relase) and the deliverable ! * version infos (unique for a deliverable within a release). ! * @param deliverable Deliverable for whom a key should be generated ! * @return A unique key corresponding to this deliverable. The key is not ! * assigned to deliverable. ! * @see java.text.MessageFormat ! * @see org.figure8.join.businessobjects.artifact.Artifact ! */ ! public String generateDeliverableKey(Deliverable deliverable){ ! // Instantiate a message format if not already done. ! if (template == null) ! template = new MessageFormat(keyTemplate); ! // Prepare and format arguments array. ! Object[] args = new Object[]{deliverable.getRelease().getName(), deliverable.getVersionInfo()}; ! return template.format(args); ! } ! ! ! // Protected ---------------------------------------------------------------- ! ! /** ! * Try to instantiate the <code>VCSAccessor</code> associated with this type (if any ...) ! * @throws InvalidParameterException if the <b>vcsAccessorClass</b> inner field is not valid ! */ ! protected void instantiateVCSAccessor() throws InvalidParameterException{ ! if (vcsAccessorClass != null && vcsAccessor == null){ ! try{ ! // Load class from context class loader and retrieve new instance. ! Class clazz = Thread.currentThread().getContextClassLoader().loadClass(vcsAccessorClass); ! vcsAccessor = (VCSAccessor)clazz.newInstance(); ! } ! catch (Exception e){ ! // Log and wrap within an InvalidParameterException. ! log.error("Exception while trying to instantiate vcsAccessor for deliverable type '" + key + "'"); ! log.error("Here's the exception message : " + e.getMessage()); ! throw new InvalidParameterException("'" + vcsAccessorClass + ! "' cannot be found or does not extend VCSAccessor", e); ! } ! } ! } ! ! ! // Implementation of SortableEntityObect ------------------------------------ ! ! /** ! * Get the comparision criterion as a string. Display label here. ! * @return The string representation of comparison and sort cirterion ! */ ! public String getStringForComparison(){ ! return getLabel(); ! } } \ No newline at end of file --- 1,352 ---- ! /** ! * Copyright 2005-2006 the original author or authors. ! * ! * Licensed under the Gnu General Pubic License, Version 2.0 (the ! * "License"); you may not use this file except in compliance with ! * the License. You may obtain a copy of the License at ! * ! * http://www.opensource.org/licenses/gpl-license.php ! * ! * This program is distributed in the hope that it will be useful, ! * but WITHOUT ANY WARRANTY; without even the implied warranty of ! * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. ! * See the Gnu General Public License for more details. ! */ ! package org.figure8.join.businessobjects.artifact; ! ! import org.figure8.join.core.SortableEntityObject; ! import org.figure8.join.core.InvalidParameterException; ! import org.figure8.join.services.vcs.VCSAccessor; ! import org.figure8.join.util.LogUtil; ! ! import org.apache.commons.logging.Log; ! ! import java.text.MessageFormat; ! /** ! * Entity object representing a deliverable type. Such a type helps ! * categorizing work deliveries done and managed through Join application. ! * <br/> ! * A deliverable type will help by knowing how to generate unique keys for ! * deliverable artifacts. (see the <code>generateDeliverableKey()</code> method) ! * <br/> ! * It is also a handler for all the connection informations to the ! * underlying Versionning and Configuration System ; in the case such a ! * system is used for retrieving deliverables. (see the <code>getVCSAccessor()</code> ! * method) ! * @author <a href="mailto:lau...@fr...">Laurent Broudoux</a> ! * @version $Revision$ ! * ! * @see org.figure8.join.services.vcs.VCSAccessor ! * ! * @hibernate.class table="join_deltypes" ! * @hibernate.cache usage="read-write" ! * ! * @hibernate.query name="join.deltype_findByKey" query="from DeliverableType type where type.key = :typeKey" ! */ ! public class DeliverableType extends SortableEntityObject{ ! ! // Static ------------------------------------------------------------------- ! ! /** Get a commons logger. */ ! private static final Log log = LogUtil.getLog(DeliverableType.class); ! ! ! // Attributes --------------------------------------------------------------- ! ! /** The deliverable type key */ ! private String key; ! /** The deliverable type label */ ! private String label; ! /** The deliverable type keyTemplate */ ! private String keyTemplate; ! /** The deliverable type is versionnable */ ! private boolean versionable; ! /** The deliverable type is mandatory */ ! private boolean mandatory; ! /** The deliverable type use version and configuration system */ ! private boolean vcsDeliverable = false; ! ! /** User for connecting to the version and configuration system */ ! private String vcsUser; ! /** Password for connecting to the version and configuration system */ ! private String vcsPassword; ! /** The root of the version and configuration system */ ! private String vcsRoot; ! /** The module of the version and configuration system */ ! private String vcsModule; ! /** The accessor class name for the version and configuration system */ ! private String vcsAccessorClass; ! ! /** The template object for generating deliverable keys */ ! private MessageFormat template = null; ! /** The VCS accessor instance of type <b>vcsAccessorClass</b> */ ! private VCSAccessor vcsAccessor = null; ! ! ! // Constructors ------------------------------------------------------------- ! ! /** Creates a new instance of DeliverableType */ ! public DeliverableType(){ ! } ! ! /** ! * Creates a new instance of DeliverableType with mandatory attributes ! * @param key The instance unique key ! * @param label The type instance label ! * @param keyTemplate The deliverable type template for key generation ! * @param versionable Wether deliverables should appear in versions ! * @param mandatory Wether deliverables are mandatory in version composition ! * @see org.figure8.join.businessobjects.artifact.Assembly ! */ ! public DeliverableType(String key, String label, String keyTemplate, boolean versionable, boolean mandatory){ ! this.key = key; ! this.label = label; ! this.keyTemplate = keyTemplate; ! this.versionable = versionable; ! this.mandatory = mandatory; ! } ! ! ! // Public ------------------------------------------------------------------- ! ! /** ! * @hibernate.property column="s_key" ! * length="10" not-null="true" ! * unique="true" update="false" ! * @return This deliverable type key ! */ ! public String getKey(){ ! return key; ! } ! /** @param key This type unique key */ ! public void setKey(String key){ ! this.key = key; ! } ! ! /** ! * @hibernate.property column="s_label" ! * length="40" not-null="true" ! * unique="true" ! * @return This type label for display ! */ ! public String getLabel(){ ! return label; ! } ! /** @param label This deliverable type label */ ! public void setLabel(String label){ ! this.label = label; ! } ! ! /** ! * @hibernate.property column="s_keytemplate" ! * length="40" not-null="true" ! * unique="true" ! * @return The template used for generating deliverable keys ! */ ! public String getKeyTemplate(){ ! return keyTemplate; ! } ! /** ! * The template used for deliverables key generation. This template ! * should be a string representing a <code>MessageFormat</code> with ! * 2 arguments. (ex: myDeliverable_r{0}_v{1}) ! * @param keyTemplate MessageFormat template ! * @see java.text.MessageFormat ! */ ! public void setKeyTemplate(String keyTemplate){ ! this.keyTemplate = keyTemplate; ! } ! ! /** ! * @hibernate.property column="b_versionable" ! * type="boolean" not-null="true" ! * @return true if deliverables of this type should be used for ! * composing a <code>Assembly</code> ! * @see org.figure8.join.businessobjects.artifact.Assembly ! */ ! public boolean getVersionable(){ ! return versionable; ! } ! /** @param versionable Wether deliverables are used for composing <code>Versions</code> */ ! public void setVersionable(boolean versionable){ ! this.versionable = versionable; ! } ! ! /** ! * @hibernate.property column="b_mandatory" ! * type="boolean" not-null="true" ! * @return true if deliverables of this type are mandatory when ! * used for composing a <code>Assembly</code> ! * @see org.figure8.join.businessobjects.artifact.Assembly ! */ ! public boolean getMandatory(){ ! return mandatory; ! } ! /** @param mandatory Wether deliverables are mandatory whe composing <code>Versions</code> */ ! public void setMandatory(boolean mandatory){ ! this.mandatory = mandatory; ! } ! ! /** ! * @hibernate.property column="b_vcsdeliverable" ! * type="boolean" not-null="true" ! * @return true if deliverables of this type are retrieved using ! * a version and configuration system (such as CVS, Subversion, ...) ! */ ! public boolean getVcsDeliverable(){ ! return vcsDeliverable; ! } ! /** @param vcsDeliverable Wether deliverables are retrieved using a version and configuration system */ ! public void setVcsDeliverable(boolean vcsDeliverable){ ! this.vcsDeliverable = vcsDeliverable; ! } ! ! /** ! * @hibernate.property column="s_vcsuser" length="30" ! * @return The user for connecting to version and configuration system ! */ ! public String getVcsUser(){ ! return vcsUser; ! } ! /** @param vcsUser The user for connecting to VCS */ ! public void setVcsUser(String vcsUser){ ! this.vcsUser = vcsUser; ! } ! ! /** ! * @hibernate.property column="s_vcspassword" length="30" ! * @return The password for connecting to version and configuration system ! */ ! public String getVcsPassword(){ ! return vcsPassword; ! } ! /** @param vcsPassword The password for connection to VCS */ ! public void setVcsPassword(String vcsPassword){ ! this.vcsPassword = vcsPassword; ! } ! ! /** ! * @hibernate.property column="s_vcsroot" length="100" ! * @return The root of version and configuration system used (might be a CVS root, a Subversion Url, etc ...) ! */ ! public String getVcsRoot(){ ! return vcsRoot; ! } ! /** @param vcsRoot The root of VCS used (CVS root, SVN Url, ...) */ ! public void setVcsRoot(String vcsRoot){ ! this.vcsRoot = vcsRoot; ! } ! ! /** ! * @hibernate.property column="s_vcsmodule" length="40" ! * @return Name of module corresponding to deliverables in VCS (CVS module, "trunk" for Subversion, etc ..) ! */ ! public String getVcsModule(){ ! return vcsModule; ! } ! /** @param vcsModule Name of module corresponding to deliverables in VCS */ ! public void setVcsModule(String vcsModule){ ! this.vcsModule = vcsModule; ! } ! ! /** ! * @hibernate.property column="s_vcsaccessorclass" length="200" ! * @return The FQN of the Java class used for connecting version and ! * configuration system corresponding to this type ! */ ! public String getVcsAccessorClass(){ ! return vcsAccessorClass; ! } ! /** ! * Assign a VCS implementation to this deliverable type. ie : an helper object that allows ! * to connect to the version and configuration system used for retrieving deliverables of ! * this type. This parameter must be the name of the Java class that implements ! * <code>org.figure8.join.services.vcs.VCSAccessor</code> ! * @param vcsAccessorClass FQN of Java class ! * @throws org.figure8.join.core.InvalidParameterException if the <b>vcsImplementationClass</b> is not valid ! */ ! public void setVcsAccessorClass(String vcsAccessorClass) throws InvalidParameterException{ ! this.vcsAccessorClass = vcsAccessorClass; ! // Try instantiating VCS accessor now. ! instantiateVCSAccessor(); ! } ! ! /** ! * Get the <code>VCSAccessor</code> associated to this type (if any). The returned accessor ! * is "ready to use" : it has been initialized with corret properties. ! * @throws InvalidParameterException if the <b>vcsAccessorClass</b> inner field is not valid ! * @return The accessor instance or null if no accessor is associated to this role ! */ ! public VCSAccessor getVCSAccessor() throws InvalidParameterException{ ! // Only available if deliverable trough VCS and if there's a accessor defined. ! if (vcsDeliverable && vcsAccessorClass != null){ ! // Instantiate if not already done. ! if (vcsAccessor == null) ! instantiateVCSAccessor(); ! // Set vcs accessor fields. ! vcsAccessor.setUser(vcsUser); ! vcsAccessor.setPassword(vcsPassword); ! vcsAccessor.setModule(vcsModule); ! vcsAccessor.setRootRepository(vcsRoot); ! // Ok. ! return vcsAccessor; ! } ! return null; ! } ! ! /** ! * Generate a unique key for a deliverable. Such a key has to be unique as ! * specified by the <code>Artifact</code>. So this implementation is using ! * the given <b>keyTemplate</b> as a java.text.MessageFormat using 2 arguments ! * that are the deliverable release name (unique for a relase) and the deliverable ! * version infos (unique for a deliverable within a release). ! * @param deliverable Deliverable for whom a key should be generated ! * @return A unique key corresponding to this deliverable. The key is not ! * assigned to deliverable. ! * @see java.text.MessageFormat ! * @see org.figure8.join.businessobjects.artifact.Artifact ! */ ! public String generateDeliverableKey(Deliverable deliverable){ ! // Instantiate a message format if not already done. ! if (template == null) ! template = new MessageFormat(keyTemplate); ! // Prepare and format arguments array. ! Object[] args = new Object[]{deliverable.getRelease().getName(), deliverable.getVersionInfo()}; ! return template.format(args); ! } ! ! ! // Protected ---------------------------------------------------------------- ! ! /** ! * Try to instantiate the <code>VCSAccessor</code> associated with this type (if any ...) ! * @throws InvalidParameterException if the <b>vcsAccessorClass</b> inner field is not valid ! */ ! protected void instantiateVCSAccessor() throws InvalidParameterException{ ! if (vcsAccessorClass != null && vcsAccessorClass.length() > 0 && vcsAccessor == null){ ! try{ ! // Load class from context class loader and retrieve new instance. ! Class clazz = Thread.currentThread().getContextClassLoader().loadClass(vcsAccessorClass); ! vcsAccessor = (VCSAccessor)clazz.newInstance(); ! } ! catch (Exception e){ ! // Log and wrap within an InvalidParameterException. ! log.error("Exception while trying to instantiate vcsAccessor for deliverable type '" + key + "'"); ! log.error("Here's the exception message : " + e.getMessage()); ! throw new InvalidParameterException("'" + vcsAccessorClass + ! "' cannot be found or does not extend VCSAccessor", e); ! } ! } ! } ! ! ! // Implementation of SortableEntityObect ------------------------------------ ! ! /** ! * Get the comparision criterion as a string. Display label here. ! * @return The string representation of comparison and sort cirterion ! */ ! public String getStringForComparison(){ ! return getLabel(); ! } } \ No newline at end of file |