Formatierung, verionID

git-svn-id: https://svn.libreccm.org/ccm/trunk@389 8810af33-2d31-482b-a856-94f89814c4df
master
pb 2010-04-24 21:20:57 +00:00
parent 83d71a3b90
commit 29db51e6a1
23 changed files with 138 additions and 83 deletions

View File

@ -49,6 +49,9 @@ import org.apache.log4j.Logger;
* that are not contained in a <code>Form</code> do not exhibit any useful
* behavior.
*
* @see Form
* @see FormModel
*
* @author Karl Goldstein
* @author Uday Mathur
* @author Stas Freidin
@ -56,9 +59,6 @@ import org.apache.log4j.Logger;
* @author David Lutterkort
*
* @version $Id: FormSection.java 287 2005-02-22 00:29:02Z sskracic $
*
* @see Form
* @see FormModel
*/
public class FormSection extends SimpleComponent implements Container {

View File

@ -526,23 +526,23 @@ public class PageState {
getPage().reset(this, c);
}
/**
* Store an attribute keyed on the object <code>key</code>. The
* <code>PageState</code> puts no restrictions on what can be stored as
* an attribute or how they are managed.
*
* To remove an attribute, call <code>setAttribute(key, null)</code>.
*
* The attributes are only accessible as long as the
* <code>PageState</code> is alive, typically only for the duration of
* the request.
*
// /**
// * Store an attribute keyed on the object <code>key</code>. The
// * <code>PageState</code> puts no restrictions on what can be stored as
// * an attribute or how they are managed.
// *
// * To remove an attribute, call <code>setAttribute(key, null)</code>.
// *
// * The attributes are only accessible as long as the
// * <code>PageState</code> is alive, typically only for the duration of
// * the request.
// *
// * @deprecated Use either <code>setAttribute</code> on {@link
* HttpServletRequest the HTTP request object}, or, preferrably, use a
* {@link RequestLocal request local} variable. Will be removed on
* 2001-06-13.
*
*/
// * HttpServletRequest the HTTP request object}, or, preferrably, use a
// * {@link RequestLocal request local} variable. Will be removed on
// * 2001-06-13.
// *
// */
// public void setAttribute(Object key, Object value) {
// if ( m_attributes == null ) {
// m_attributes = new HashMap();
@ -550,16 +550,16 @@ public class PageState {
// m_attributes.put(key, value);
// }
/**
* Get the value of an attribute stored with the same key with {@link
* #setAttribute setAttribute}.
*
// /**
// * Get the value of an attribute stored with the same key with {@link
// * #setAttribute setAttribute}.
// *
// * @deprecated Use either <code>getAttribute</code> on {@link
* HttpServletRequest the HTTP request object}, or, preferrably, use a
* {@link RequestLocal request local} variable. Will be removed on
* 2001-06-13.
*
*/
// * HttpServletRequest the HTTP request object}, or, preferrably, use a
// * {@link RequestLocal request local} variable. Will be removed on
// * 2001-06-13.
// *
// */
// public Object getAttribute(Object key) {
// if ( m_attributes == null ) {
// return null;
@ -629,15 +629,15 @@ public class PageState {
}
}
/**
* Change the value of a global parameter
*
// /**
// * Change the value of a global parameter
// *
// * @deprecated Use {@link #setValue(ParameterModel m, Object o)}
* instead. If you don't have a reference to the parameter model, you
* should not be calling this method. Instead, the component that
* registered the parameter should provide methods to manipulate
* it. Will be removed 2001-06-20.
*/
// * instead. If you don't have a reference to the parameter model, you
// * should not be calling this method. Instead, the component that
// * registered the parameter should provide methods to manipulate
// * it. Will be removed 2001-06-20.
// */
// public void setGlobalValue(String name, Object value) {
// m_pageState.put(m_page.parameterName(name), value);
// }

View File

@ -52,6 +52,8 @@ import com.arsdigita.search.converter.OOConverter;
import com.arsdigita.search.converter.WordConverter;
import com.arsdigita.search.converter.TextConverter;
import org.apache.log4j.Logger;
/**
* CoreInitializer
@ -62,13 +64,17 @@ import com.arsdigita.search.converter.TextConverter;
public class Initializer extends CompoundInitializer {
private static Logger s_log = Logger.getLogger(Initializer.class);
/**
* Constructor
*/
public Initializer() {
s_log.info("Instantiating Core Initilizer ...");
final String url = RuntimeConfig.getConfig().getJDBCURL();
final int database = DbHelper.getDatabaseFromURL(url);
s_log.info("Ading Sub-Initilizers ...");
add(new com.arsdigita.persistence.Initializer());
add(new PDLInitializer
@ -88,6 +94,8 @@ public class Initializer extends CompoundInitializer {
public final void init(final DomainInitEvent e) {
super.init(e);
s_log.info("Running core init(DomainInitEvent) ...");
e.getFactory().registerInstantiator
(Host.BASE_DATA_OBJECT_TYPE,
new DomainObjectInstantiator() {
@ -164,11 +172,15 @@ public class Initializer extends CompoundInitializer {
converter = new TextConverter();
ConverterRegistry.registerConverter(converter,
converter.getMimeTypes());
s_log.info("Core init(DomainInitEvent) done");
}
public final void init(final LegacyInitEvent e) {
super.init(e);
s_log.info("Running core init(LegacyInitEvent) ...");
Session session = SessionManager.getSession();
TransactionContext txn = session.getTransactionContext();
txn.beginTxn();
@ -176,5 +188,7 @@ public class Initializer extends CompoundInitializer {
txn.commitTxn();
FactoriesSetup.setupFactories();
s_log.info("Core init(LegacyInitEvent) done");
}
}

View File

@ -81,7 +81,8 @@ public class Configuration {
Class type, Object defaultValue)
throws InitializationException {
if (m_parameters.containsKey(name))
throw new InitializationException("Parameter " + name + " already defined.");
throw new InitializationException("Parameter " + name +
" already defined.");
m_types.put(name, type);
typeCheck(name, defaultValue);
m_parameters.put(name, defaultValue);

View File

@ -37,6 +37,7 @@ import java.util.Set;
*
* @author <a href="mailto:rhs@mit.edu">rhs@mit.edu</a>
* @version $Id: Script.java 738 2005-09-01 12:36:52Z sskracic $
* @version $Id: Script.java 738 2005-09-01 12:36:52Z sskracic $
*/
public class Script {

View File

@ -37,15 +37,11 @@ import java.util.Properties;
*
* @author Rafael H. Schloming &lt;rhs@mit.edu&gt;
* @version $Revision: #7 $ $Date: 2004/08/16 $
* @version $Id: MailConfig.java 1513 2007-03-22 09:09:03Z chrisgilbert23 $
**/
public final class MailConfig extends AbstractConfig {
public final static String versionId =
"$Id: MailConfig.java 1513 2007-03-22 09:09:03Z chrisgilbert23 $" +
" by $Author: chrisgilbert23 $, "+
"$DateTime: 2004/08/16 18:10:38 $";
private Properties m_props;
private final Parameter m_debug = new BooleanParameter

View File

@ -55,17 +55,13 @@ import org.apache.log4j.Logger;
*
* @author Rafael H. Schloming &lt;rhs@mit.edu&gt;
* @version $Revision: #13 $ $Date: 2004/08/16 $
* @version $Id: Loader.java 736 2005-09-01 10:46:05Z sskracic $
**/
class Loader {
private static final Logger s_log = Logger.getLogger(Loader.class);
public final static String versionId =
"$Id: Loader.java 736 2005-09-01 10:46:05Z sskracic $" +
"by $Author: sskracic $, " +
"$DateTime: 2004/08/16 18:10:38 $";
private static final String INIT = "com.arsdigita.runtime.Initializer";
public static Loader get(String pkg) {

View File

@ -75,6 +75,7 @@ import org.apache.log4j.Logger;
* mappings are then used by the ConfigRegistry instance to load config objects.
*
* @author Rafael H. Schloming &lt;rhs@mit.edu&gt;
* @version $Revision: #15 $ $Date: 2004/08/16 $
* @version $Id: ConfigRegistry.java 736 2005-09-01 10:46:05Z sskracic $
**/
@ -82,6 +83,11 @@ public class ConfigRegistry {
private static final Logger s_log = Logger.getLogger(ConfigRegistry.class);
/**
* Base url for registry location(s).
* (i.e. $CATALINA_HOME/webapps/$context/WEB-INF/conf/registry in a
* standard installation)
*/
private URL m_url;
private ClassLoader m_loader;
@ -143,7 +149,13 @@ public class ConfigRegistry {
this(CCMResourceManager.getConfigURL());
}
/**
*
* @param url Base url for registry location(s).
* @param errs Errorlist
*/
private void initialize(URL url, ErrorList errs) {
ClassLoader ldr = new URLClassLoader(new URL[] {url}, null);
RegistryConfig rc = new RegistryConfig();
@ -283,8 +295,7 @@ public class ConfigRegistry {
*
* @return an input stream containing the contents of the resource
* or null if the resource is not found
**/
*/
public InputStream load(String resource) {
for (int i = m_loaders.size() - 1; i >= 0; i--) {
ClassLoader ldr = (ClassLoader) m_loaders.get(i);

View File

@ -61,7 +61,10 @@ import java.io.InputStream;
public class LegacyInitializer extends GenericInitializer {
/** The name of a resource referring to a legacy enterprise.init file.
* (path/filename relative to src root, i.e. /com/arsdigita/.....) */
protected String m_init;
protected ConfigRegistry m_reg;
/**

View File

@ -18,7 +18,7 @@
*/
package com.arsdigita.runtime;
import com.arsdigita.runtime.AbstractConfig;
// import com.arsdigita.runtime.AbstractConfig;
import com.arsdigita.util.StringUtils;
import com.arsdigita.util.parameter.ErrorList;
import com.arsdigita.util.parameter.Parameter;

View File

@ -320,9 +320,7 @@ public class Runtime extends CompoundInitializer {
s_log.debug("Going to call CompoundInitializer.close()");
init.close(evt);
// Pausieren von ca. 1 Min. / 60 sek. um das Ende von laufenden Threads
// abzuwarten.
s_log.info("Waiting for background threads to terminate");
s_log.info("Waiting 60 secs for background threads to terminate");
try {
Thread.currentThread().sleep(60000);
} catch( InterruptedException e) {

View File

@ -90,7 +90,7 @@ public abstract class FilterSpecification {
}
/**
* Two filter specifications are considered isEqual
* Two filter specifications are considered equal
* if they refer to the same filter type
* and their parameter sets contain the same
* (key, value) pairs

View File

@ -64,7 +64,7 @@ public abstract class FilterType {
/**
* Two filter type objects compare
* isEqual if they have the same filter
* equal if they have the same filter
* key
*/
public boolean equals(Object o) {

View File

@ -111,7 +111,7 @@ public class QuerySpecification {
}
/**
* Two query specifications compare isEqual if they
* Two query specifications compare equal if they
* have the same search term, have the same setting
* for partial matches and contain the same set of
* filter specifications.

View File

@ -63,7 +63,7 @@ public class StringUtils {
* otherwise <code>false</code>
*/
public final static boolean emptyString(String s) {
boolean expr = (s == null || s.length() == 0);
boolean expr = (s == null || s.trim().length() == 0);
return expr;
}
@ -169,8 +169,10 @@ public class StringUtils {
* <li>*text* generates bold <strong>text</strong>
* <li>/text/ generates italic <em>text</em>
* <li>=text= generates fixed <code>text</code>
* <li>@text(http://www.google.com) generates a titled link <a href="http://www.google.com">text</a>
* <li>http://www.google.com generates an untitled link <a href="http://www.google.com">http://www.google.com</a>
* <li>@text(http://www.google.com) generates a titled link
* <a href="http://www.google.com">text</a>
* <li>http://www.google.com generates an untitled link
* <a href="http://www.google.com">http://www.google.com</a>
* <li>--- <br/>generates a horizontal line<br/> <hr/>
* <li>___ <br/>generates a horizontal line<br/> <hr/>
* <li><p>* my item <br>
@ -413,7 +415,8 @@ public class StringUtils {
Integer i = new Integer(m_hash.size());
s_log.debug("Key: " + i);
m_hash.put(i, link);
String dst = "@\u0002" + i.toString() + "\u0002(\u0002" + i.toString() + "\u0002)";
String dst = "@\u0002" + i.toString() + "\u0002(\u0002" +
i.toString() + "\u0002)";
appendBuffer.append(dst);
s_log.debug("Encoded Link: " + dst);
}
@ -626,10 +629,13 @@ public class StringUtils {
}
/**
* Extract a parameter value from a packed list of parameter values.
* Example: input: key="age", sep=',', plist="cost=23,age=27,name=Thom"
* output = "27". This is a simple implementation that is meant
* for controlled use in which the key and values are known to
* be safe. Specifically, the equals character must be used to indicate
* Example:
* input: key="age", sep=',',
* plist="cost=23,age=27,name=Thom"
* output = "27".
* This is a simple implementation that is meant for controlled use in which
* the key and values are known to be safe.
* Specifically, the equals character must be used to indicate
* parameter assignments. There is no escape character. Thus the
* parameter names and values cannot contain the equals character or the
* separator character.
@ -1043,8 +1049,8 @@ public class StringUtils {
}
/**
* Returns true if the String is AlphaNumeric. Obviously, this is not at all globalized and should
* only be used with English text.
* Returns true if the String is AlphaNumeric. Obviously, this is not at all
* globalized and should only be used with English text.
*
* @param value String to check
* @return true if value is alphanumeric, false otherwise.
@ -1302,9 +1308,11 @@ public class StringUtils {
}
/**
* Convert a name into a URL form, the java equivalent of "<code>manipulate-input.js</code>"
* Convert a name into a URL form, the java equivalent of
* "<code>manipulate-input.js</code>"
*
* For example, "<code>Business promotions!</code>" will be converted to "<code>business-promotions</code>".
* For example, "<code>Business promotions!</code>" will be converted to
* "<code>business-promotions</code>".
*
* @param name
* the to be converted into a URL.

View File

@ -32,7 +32,7 @@ import javax.mail.internet.InternetAddress;
* Demonstrates how to use the CSVParameterLoader class.
*
* OUTDATED! CSVParameterLoader has become CSVParameterReader
* see CoreLoader as an example how to use CSVParamegterReader
* see CoreLoader as an example how to use CSVParameterReader
*
* @author Justin Ross &lt;jross@redhat.com&gt;
* @version $Id: CSV.java 287 2005-02-22 00:29:02Z sskracic $

View File

@ -19,12 +19,12 @@
package com.arsdigita.util.parameter;
/**
* Subject to change.
*
* Reads an encoded string value for a parameter from storage. Any
* errors encountered while reading are added to an error list.
* This class is counterpart to <code>ParameterWriter</code>.
*
* Subject to change.
*
* @see Parameter#write(ParameterWriter, Object)
* @see ErrorList
* @see ParameterWriter

View File

@ -24,9 +24,27 @@ import com.arsdigita.util.StringUtils;
/**
* StringArrayParameter
*
* Usage Esample:
* <pre>
* private static parameter exampleName ;
* exampleName = new StringArrayParameter(
* "com.arsdigita.package.example_name",
* Parameter.REQUIRED,
* new String[] {"String Example 01","String Example 02"}
* );
* </pre>
*
* @version $Id: $
*/
public class StringArrayParameter extends StringParameter {
/**
*
* @param name: String literal
* @param multiplicity Indicator wether required (1) or not (0) (nullable)
* @param defaalt default value
*/
public StringArrayParameter(final String name,
final int multiplicity,
final Object defaalt) {

View File

@ -231,8 +231,10 @@ public class ApplicationType extends ResourceType {
* parameter is used to create a legacy package type to back the
* new application type.
*/
public static ApplicationType createApplicationType
(String key, String title, String applicationObjectType, boolean createContainerGroup) {
public static ApplicationType createApplicationType(
String key, String title,
String applicationObjectType,
boolean createContainerGroup) {
// See if the package type is already present.
PackageType packageType = null;

View File

@ -48,7 +48,7 @@ import java.util.Iterator;
import org.apache.log4j.Logger;
/**
* Aser task that is associated with an interface for
* User task that is associated with an interface for
* performing some manual operation.
*
* @author Karl Goldstein

View File

@ -27,10 +27,10 @@ import java.util.HashMap;
*
* @author Rafael H. Schloming &lt;rhs@mit.edu&gt;
* @version $Revision: #7 $ $Date: 2004/08/16 $
**/
* @version $Id: Mist.java 738 2005-09-01 12:36:52Z sskracic $
*/
class Mist extends AbstractList {
public final static String versionId = "$Id: Mist.java 738 2005-09-01 12:36:52Z sskracic $ by $Author: sskracic $, $DateTime: 2004/08/16 18:10:38 $";
private Object m_parent = null;
private ArrayList m_children = new ArrayList();
private HashMap m_childrenMap = new HashMap();
@ -92,7 +92,7 @@ class Mist extends AbstractList {
Element child = (Element) o;
// Quasimodo: BEGIN
// Diabled because it prevents to delete item from the list.
// Disabled because it prevents to delete item from the list.
// The result is always false because child.getParent() gets
// the parent of the Class. It doesn't say anything about the
// membership to this List.
@ -133,4 +133,5 @@ class Mist extends AbstractList {
public String toString() {
return m_children.toString();
}
}

View File

@ -23,7 +23,8 @@ package com.redhat.persistence.oql;
*
* @author Rafael H. Schloming &lt;rhs@mit.edu&gt;
* @version $Revision: #4 $ $Date: 2004/08/16 $
**/
* @version $Id: Condition.java 287 2005-02-22 00:29:02Z sskracic $
*/
public abstract class Condition extends Expression {

View File

@ -37,6 +37,11 @@ log4j.logger.com.arsdigita.runtime.Runtime=INFO
# For seeing progress of the 'ccm load' command
log4j.logger.com.arsdigita.packaging.Loader=INFO
# log4j.logger.com.arsdigita.core.Loader=INFO
# log4j.logger.com.arsdigita.loader.CoreLoader=INFO
# log4j.logger.com.arsdigita.core.Initializer=INFO
# log4j.logger.com.arsdigita.cms.Loader=INFO
# log4j.logger.com.arsdigita.cms.Initializer=INFO
# For seeing progress of legacy initialization process
#log4j.logger.com.arsdigita.initializer.Script=INFO