Kleine, unbedeutene Aufräumarbeiten

git-svn-id: https://svn.libreccm.org/ccm/trunk@557 8810af33-2d31-482b-a856-94f89814c4df
master
quasi 2010-10-06 05:48:09 +00:00
parent 121254b4cb
commit b12c2739ca
4 changed files with 25 additions and 19 deletions

View File

@ -58,6 +58,7 @@ public class SimpleComponent extends Completable
* @return the clone of a component. * @return the clone of a component.
* @post ! ((SimpleComponent) return).isLocked() * @post ! ((SimpleComponent) return).isLocked()
*/ */
@Override
public Object clone() throws CloneNotSupportedException { public Object clone() throws CloneNotSupportedException {
SimpleComponent result = (SimpleComponent) super.clone(); SimpleComponent result = (SimpleComponent) super.clone();
if ( m_attr != null ) { if ( m_attr != null ) {
@ -269,9 +270,9 @@ public class SimpleComponent extends Completable
*/ */
public Component setKey(String key) { public Component setKey(String key) {
Assert.isUnlocked(this); Assert.isUnlocked(this);
if (key.charAt(0) >= 0 && key.charAt(0) <= 9) //TODO: be more strict. if (key.charAt(0) >= 0 && key.charAt(0) <= 9) {
throw new IllegalArgumentException throw new IllegalArgumentException("key \"" + key + "\" must not start with a digit.");
("key \"" + key + "\" must not start with a digit."); }
m_key = key; m_key = key;
return this; return this;
} }

View File

@ -21,10 +21,7 @@ package com.arsdigita.categorization;
import com.arsdigita.kernel.ACSObject; import com.arsdigita.kernel.ACSObject;
import com.arsdigita.kernel.ACSObjectCollection; import com.arsdigita.kernel.ACSObjectCollection;
// unused imports
// import com.arsdigita.persistence.DataAssociation;
import com.arsdigita.persistence.DataCollection; import com.arsdigita.persistence.DataCollection;
// import com.arsdigita.persistence.DataObject;
/** /**
* Represents a collection of categoryLocalizations. * Represents a collection of categoryLocalizations.
@ -34,8 +31,6 @@ import com.arsdigita.persistence.DataCollection;
* or {@link Category#getDescendants()}.</p> * or {@link Category#getDescendants()}.</p>
* *
* @author Sören Bernstein (quasimodo) quasi@zes.uni-bremen.de * @author Sören Bernstein (quasimodo) quasi@zes.uni-bremen.de
* @author Randy Graebner (randyg@alum.mit.edu)
* @version $Revision: #15 $ $DateTime: 2004/08/16 18:10:38 $
**/ **/
public class CategoryLocalizationCollection extends ACSObjectCollection { public class CategoryLocalizationCollection extends ACSObjectCollection {
@ -109,6 +104,7 @@ public class CategoryLocalizationCollection extends ACSObjectCollection {
return (CategoryLocalization) getDomainObject(); return (CategoryLocalization) getDomainObject();
} }
@Override
public ACSObject getACSObject() { public ACSObject getACSObject() {
return getCategoryLocalization(); return getCategoryLocalization();
} }
@ -125,12 +121,16 @@ public class CategoryLocalizationCollection extends ACSObjectCollection {
if(!m_dataCollection.isEmpty() && locale != "") { if(!m_dataCollection.isEmpty() && locale != "") {
// First check, if we are already at the right position. This will speed up repeated access for the same locale // First check, if we are already at the right position. This will speed up repeated access for the same locale
if(this.getPosition() > 0 && this.getCategoryLocalization().getLocale().equals(locale)) return true; if(this.getPosition() > 0 && this.getCategoryLocalization().getLocale().equals(locale)) {
return true;
}
// Nope, so we have to start a search // Nope, so we have to start a search
this.rewind(); this.rewind();
while(this.next()) { while(this.next()) {
if(this.getCategoryLocalization().getLocale().equals(locale)) return true; if(this.getCategoryLocalization().getLocale().equals(locale)) {
return true;
}
} }
} }

View File

@ -15,7 +15,6 @@
* License along with this library; if not, write to the Free Software * License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/ */
package com.arsdigita.london.navigation; package com.arsdigita.london.navigation;
import com.arsdigita.domain.DomainObjectFactory; import com.arsdigita.domain.DomainObjectFactory;
@ -51,10 +50,8 @@ public class DataCollectionRenderer extends LockableImpl {
private static final Logger s_log = private static final Logger s_log =
Logger.getLogger(DataCollectionRenderer.class); Logger.getLogger(DataCollectionRenderer.class);
private ArrayList m_attributes = new ArrayList(); private ArrayList m_attributes = new ArrayList();
private ArrayList m_properties = new ArrayList(); private ArrayList m_properties = new ArrayList();
private int m_pageSize = 20; private int m_pageSize = 20;
private boolean m_specializeObjects = false; private boolean m_specializeObjects = false;
private boolean m_wrapAttributes = false; private boolean m_wrapAttributes = false;
@ -185,8 +182,7 @@ public class DataCollectionRenderer extends LockableImpl {
DataObject dobj = objects.getDataObject(); DataObject dobj = objects.getDataObject();
ACSObject object = null; ACSObject object = null;
if (m_specializeObjects) { if (m_specializeObjects) {
object = (ACSObject) object = (ACSObject) DomainObjectFactory.newInstance(dobj);
DomainObjectFactory.newInstance(dobj);
} }
Element item = Navigation.newElement("item"); Element item = Navigation.newElement("item");
@ -279,8 +275,8 @@ public class DataCollectionRenderer extends LockableImpl {
} }
} }
private void valuePersistenceError( PersistenceException ex, private void valuePersistenceError(PersistenceException ex,
String[] paths, int depth ) { String[] paths, int depth) {
StringBuffer msg = new StringBuffer(); StringBuffer msg = new StringBuffer();
msg.append("Attribute "); msg.append("Attribute ");
for (int i = 0; i <= depth; i++) { for (int i = 0; i <= depth; i++) {

View File

@ -60,6 +60,15 @@
<!-- xmlfeed may not be needed by ZeS, too --> <!-- xmlfeed may not be needed by ZeS, too -->
<ccm:application name="ccm-cms-types-xmlfeed"/> <ccm:application name="ccm-cms-types-xmlfeed"/>
<ccm:application name="ccm-cms-types-baseAddress"/>
<ccm:application name="ccm-cms-types-baseContact"/>
<ccm:application name="ccm-cms-types-genericorganization"/>
<ccm:application name="ccm-cms-types-healthCareFacility"/>
<ccm:application name="ccm-cms-types-person"/>
<ccm:application name="ccm-cms-types-organization"/>
<ccm:application name="ccm-cms-types-organizationalunit"/>
<!-- Applications --> <!-- Applications -->
<!-- - - - - - - --> <!-- - - - - - - -->
<!-- <ccm:application name="ccm-auth-http"/> --> <!-- <ccm:application name="ccm-auth-http"/> -->