Kleine, unbedeutene Aufräumarbeiten
git-svn-id: https://svn.libreccm.org/ccm/trunk@557 8810af33-2d31-482b-a856-94f89814c4dfmaster
parent
121254b4cb
commit
b12c2739ca
|
|
@ -58,6 +58,7 @@ public class SimpleComponent extends Completable
|
|||
* @return the clone of a component.
|
||||
* @post ! ((SimpleComponent) return).isLocked()
|
||||
*/
|
||||
@Override
|
||||
public Object clone() throws CloneNotSupportedException {
|
||||
SimpleComponent result = (SimpleComponent) super.clone();
|
||||
if ( m_attr != null ) {
|
||||
|
|
@ -269,9 +270,9 @@ public class SimpleComponent extends Completable
|
|||
*/
|
||||
public Component setKey(String key) {
|
||||
Assert.isUnlocked(this);
|
||||
if (key.charAt(0) >= 0 && key.charAt(0) <= 9) //TODO: be more strict.
|
||||
throw new IllegalArgumentException
|
||||
("key \"" + key + "\" must not start with a digit.");
|
||||
if (key.charAt(0) >= 0 && key.charAt(0) <= 9) {
|
||||
throw new IllegalArgumentException("key \"" + key + "\" must not start with a digit.");
|
||||
}
|
||||
m_key = key;
|
||||
return this;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -21,10 +21,7 @@ package com.arsdigita.categorization;
|
|||
|
||||
import com.arsdigita.kernel.ACSObject;
|
||||
import com.arsdigita.kernel.ACSObjectCollection;
|
||||
// unused imports
|
||||
// import com.arsdigita.persistence.DataAssociation;
|
||||
import com.arsdigita.persistence.DataCollection;
|
||||
// import com.arsdigita.persistence.DataObject;
|
||||
|
||||
/**
|
||||
* Represents a collection of categoryLocalizations.
|
||||
|
|
@ -34,8 +31,6 @@ import com.arsdigita.persistence.DataCollection;
|
|||
* or {@link Category#getDescendants()}.</p>
|
||||
*
|
||||
* @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 {
|
||||
|
||||
|
|
@ -109,6 +104,7 @@ public class CategoryLocalizationCollection extends ACSObjectCollection {
|
|||
return (CategoryLocalization) getDomainObject();
|
||||
}
|
||||
|
||||
@Override
|
||||
public ACSObject getACSObject() {
|
||||
return getCategoryLocalization();
|
||||
}
|
||||
|
|
@ -125,12 +121,16 @@ public class CategoryLocalizationCollection extends ACSObjectCollection {
|
|||
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
|
||||
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
|
||||
this.rewind();
|
||||
while(this.next()) {
|
||||
if(this.getCategoryLocalization().getLocale().equals(locale)) return true;
|
||||
if(this.getCategoryLocalization().getLocale().equals(locale)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -15,7 +15,6 @@
|
|||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
package com.arsdigita.london.navigation;
|
||||
|
||||
import com.arsdigita.domain.DomainObjectFactory;
|
||||
|
|
@ -50,11 +49,9 @@ import org.apache.log4j.Logger;
|
|||
public class DataCollectionRenderer extends LockableImpl {
|
||||
|
||||
private static final Logger s_log =
|
||||
Logger.getLogger(DataCollectionRenderer.class);
|
||||
|
||||
Logger.getLogger(DataCollectionRenderer.class);
|
||||
private ArrayList m_attributes = new ArrayList();
|
||||
private ArrayList m_properties = new ArrayList();
|
||||
|
||||
private int m_pageSize = 20;
|
||||
private boolean m_specializeObjects = false;
|
||||
private boolean m_wrapAttributes = false;
|
||||
|
|
@ -107,7 +104,7 @@ public class DataCollectionRenderer extends LockableImpl {
|
|||
* @pageNumber current page, starting from 1
|
||||
*/
|
||||
public Element generateXML(DataCollection objects,
|
||||
int pageNumber) {
|
||||
int pageNumber) {
|
||||
Assert.isLocked(this);
|
||||
|
||||
// Quasimodo: Begin
|
||||
|
|
@ -185,8 +182,7 @@ public class DataCollectionRenderer extends LockableImpl {
|
|||
DataObject dobj = objects.getDataObject();
|
||||
ACSObject object = null;
|
||||
if (m_specializeObjects) {
|
||||
object = (ACSObject)
|
||||
DomainObjectFactory.newInstance(dobj);
|
||||
object = (ACSObject) DomainObjectFactory.newInstance(dobj);
|
||||
}
|
||||
|
||||
Element item = Navigation.newElement("item");
|
||||
|
|
@ -279,8 +275,8 @@ public class DataCollectionRenderer extends LockableImpl {
|
|||
}
|
||||
}
|
||||
|
||||
private void valuePersistenceError( PersistenceException ex,
|
||||
String[] paths, int depth ) {
|
||||
private void valuePersistenceError(PersistenceException ex,
|
||||
String[] paths, int depth) {
|
||||
StringBuffer msg = new StringBuffer();
|
||||
msg.append("Attribute ");
|
||||
for (int i = 0; i <= depth; i++) {
|
||||
|
|
|
|||
|
|
@ -60,6 +60,15 @@
|
|||
<!-- xmlfeed may not be needed by ZeS, too -->
|
||||
<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 -->
|
||||
<!-- - - - - - - -->
|
||||
<!-- <ccm:application name="ccm-auth-http"/> -->
|
||||
|
|
|
|||
Loading…
Reference in New Issue