- * ObjectRelationalBridge field conversion. - *
- * Converts from a comma-delimited field to ajava.util.collection
- *
- * @author Scott T. Weaver
- */
-public class CSVtoCollectionFieldConversion implements FieldConversion
-{
- private static final String DELIM = ",";
- private static final String QUOTE = "\"";
-
- private static final Log log = LogFactory.getLog(CSVtoCollectionFieldConversion.class);
-
- /**
- * @see org.apache.ojb.broker.accesslayer.conversions.FieldConversion#javaToSql(java.lang.Object)
- * @task Fix JDK 1.3 complient problem described in the FIXME
- */
- public Object javaToSql(Object arg0) throws ConversionException
- {
- if (arg0 instanceof Collection)
- {
- Collection col = ((Collection) arg0);
- if (col.size() == 0)
- {
- return "";
- }
-
- Iterator itr = col.iterator();
- // Estimate that the average word is going to be 5 characters long
- StringBuffer buffer = new StringBuffer((col.size() * 5));
- while (itr.hasNext())
- {
- buffer.append(QUOTE);
- String value = getNext(itr);
-
- // FIXME: The following is not JDK1.3 complient. So I implement a warning
- // message as a workaround until this field conversion is no longer
- // need and delete, or the code is made JDK 1.3 complient. (Paul Spencer)
-
- // buffer.append(value.replaceAll("\"","\\\\\""));
- if(value != null && value.toString().indexOf("\"") >= 0)
- {
- // FieldConversionLog.LOG.error("The string '" + value +
- // "' contains embeded '\"'. It will not be converted to a CSV correctly.");
- log.warn("In CSVtoCollectionFieldConversion() - The string '" + value +
- "' contains embeded '\"'. It will not be converted to a CSV correctly.");
- }
- buffer.append(value);
- // End of FIXME:
- buffer.append(QUOTE);
-
- if (itr.hasNext())
- {
- buffer.append(DELIM);
- }
- }
-
- return buffer.toString();
- }
- return arg0;
- }
-
- /**
- * @see org.apache.ojb.broker.accesslayer.conversions.FieldConversion#sqlToJava(java.lang.Object)
- */
- public Object sqlToJava(Object arg0) throws ConversionException
- {
-
- if (arg0 instanceof String)
- {
- StringReader sr = new StringReader((String) arg0);
- StreamTokenizer st = new StreamTokenizer(sr);
- st.resetSyntax();
- st.whitespaceChars(',', ',');
- st.quoteChar('"');
- st.eolIsSignificant(false);
-
-
- ArrayList list = new ArrayList();
- try
- {
- while (st.nextToken() != StreamTokenizer.TT_EOF)
- {
- list.add(createObject(st.sval));
- log.debug("Parsed token value: "+st.sval);
- }
- }
- catch (IOException e)
- {
- String message = "CSV parsing failed during field conversion.";
- log.error(message, e);
- throw new ConversionException("CSV parsing failed during field conversion.", e);
- }
-
- return list;
- }
-
- return arg0;
- }
-
- /**
- * Makes creation of objects created via csv fields extensible
- * By default simply return the string value.
- *
- * @param name The string value
- * @return The string value
- */
- protected Object createObject(String name)
- {
- return name;
- }
-
- /**
- * Makes getting objects via csv fields extensible
- * By default simply return the string value.
- *
- * @param name The string value
- * @return The string value
- */
- protected String getNext(Iterator iterator)
- {
- return (String) iterator.next();
- }
-
-}
Index: components/persistence/src/java/org/apache/jetspeed/util/ojb/CSVtoPortletModeFieldConversion.java
===================================================================
RCS file: components/persistence/src/java/org/apache/jetspeed/util/ojb/CSVtoPortletModeFieldConversion.java
diff -N components/persistence/src/java/org/apache/jetspeed/util/ojb/CSVtoPortletModeFieldConversion.java
--- components/persistence/src/java/org/apache/jetspeed/util/ojb/CSVtoPortletModeFieldConversion.java 8 Mar 2004 00:47:07 -0000 1.2
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,50 +0,0 @@
-/*
- * Copyright 2000-2004 The Apache Software Foundation.
- *
- * Licensed under the Apache 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.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.jetspeed.util.ojb;
-
-import java.util.Iterator;
-
-import javax.portlet.PortletMode;
-
-import org.apache.ojb.broker.accesslayer.conversions.FieldConversion;
-
-/**
- * CSVtoPortletModeFieldConversion
- *
- * @author David Sean Taylor
- * @version $Id: CSVtoPortletModeFieldConversion.java,v 1.2 2004/03/08 00:47:07 jford Exp $
- */
-public class CSVtoPortletModeFieldConversion extends CSVtoCollectionFieldConversion implements FieldConversion
-{
- /* (non-Javadoc)
- * @see org.apache.jetspeed.util.ojb.CSVtoCollectionFieldConversion#getNext(java.util.Iterator)
- */
- protected String getNext(Iterator iterator)
- {
- PortletMode mode = (PortletMode)iterator.next();
- return mode.toString();
- }
-
- /* (non-Javadoc)
- * @see org.apache.jetspeed.util.ojb.CSVtoCollectionFieldConversion#createObject(java.lang.String)
- */
- protected Object createObject(String name)
- {
- return new PortletMode(name);
- }
-
-
-}
Index: components/persistence/src/java/org/apache/jetspeed/util/ojb/CollectionDebugger.java
===================================================================
RCS file: components/persistence/src/java/org/apache/jetspeed/util/ojb/CollectionDebugger.java
diff -N components/persistence/src/java/org/apache/jetspeed/util/ojb/CollectionDebugger.java
--- components/persistence/src/java/org/apache/jetspeed/util/ojb/CollectionDebugger.java 24 Feb 2004 00:31:46 -0000 1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,65 +0,0 @@
-/**
- * Created on Jan 22, 2004
- *
- *
- * @author
- */
-package org.apache.jetspeed.util.ojb;
-
-
-import org.apache.ojb.broker.PersistenceBroker;
-import org.apache.ojb.broker.accesslayer.QueryCustomizer;
-import org.apache.ojb.broker.metadata.CollectionDescriptor;
-
-import org.apache.ojb.broker.query.Query;
-import org.apache.ojb.broker.query.QueryByCriteria;
-
-
-/**
- * - * CollectionDebugger - *
- * - * @author Scott T. Weaver - * @version $Id: CollectionDebugger.java,v 1.1 2004/02/24 00:31:46 weaver Exp $ - * - */ -public class CollectionDebugger implements QueryCustomizer -{ - - /** - * @see org.apache.ojb.broker.accesslayer.QueryCustomizer#customizeQuery(java.lang.Object, org.apache.ojb.broker.PersistenceBroker, org.apache.ojb.broker.metadata.CollectionDescriptor, org.apache.ojb.broker.query.QueryByCriteria) - */ - public Query customizeQuery(Object arg0, PersistenceBroker pb, CollectionDescriptor arg2, QueryByCriteria arg3) - { - return arg3; - } - - /** - * @see org.apache.ojb.broker.metadata.AttributeContainer#addAttribute(java.lang.String, java.lang.String) - */ - public void addAttribute(String arg0, String arg1) - { - // TODO Auto-generated method stub - - } - - /** - * @see org.apache.ojb.broker.metadata.AttributeContainer#getAttribute(java.lang.String, java.lang.String) - */ - public String getAttribute(String arg0, String arg1) - { - // TODO Auto-generated method stub - return null; - } - - /** - * @see org.apache.ojb.broker.metadata.AttributeContainer#getAttribute(java.lang.String) - */ - public String getAttribute(String arg0) - { - // TODO Auto-generated method stub - return null; - } - -} Index: components/persistence/src/java/org/apache/jetspeed/util/ojb/FieldConversionLog.java =================================================================== RCS file: components/persistence/src/java/org/apache/jetspeed/util/ojb/FieldConversionLog.java diff -N components/persistence/src/java/org/apache/jetspeed/util/ojb/FieldConversionLog.java --- components/persistence/src/java/org/apache/jetspeed/util/ojb/FieldConversionLog.java 8 Mar 2004 00:47:07 -0000 1.2 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,36 +0,0 @@ -/* - * Copyright 2000-2004 The Apache Software Foundation. - * - * Licensed under the Apache 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.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.apache.jetspeed.util.ojb; - -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; - -/** - * Utility class that allows convenient access to commons=logging for OJB - * FiledConversions without having to define a - *org.apache.commons.logging.Log in each of conversion
- * class.
- *
- *@author Scott T. Weaver
- */
-public abstract class FieldConversionLog
-{
- /**
- * There is only default ("package") access to this Log only as
- * all OJB FieldConversions should be located here.
- */
- static final Log LOG = LogFactory.getLog("org.apache.jetspeed.util.ojb");
-}
Index: components/persistence/src/java/org/apache/jetspeed/util/ojb/LocaleFieldConversion.java
===================================================================
RCS file: components/persistence/src/java/org/apache/jetspeed/util/ojb/LocaleFieldConversion.java
diff -N components/persistence/src/java/org/apache/jetspeed/util/ojb/LocaleFieldConversion.java
--- components/persistence/src/java/org/apache/jetspeed/util/ojb/LocaleFieldConversion.java 8 Mar 2004 00:47:07 -0000 1.2
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,125 +0,0 @@
-/*
- * Copyright 2000-2004 The Apache Software Foundation.
- *
- * Licensed under the Apache 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.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.jetspeed.util.ojb;
-
-import java.util.Locale;
-import java.util.StringTokenizer;
-
-import org.apache.ojb.broker.accesslayer.conversions.ConversionException;
-import org.apache.ojb.broker.accesslayer.conversions.FieldConversion;
-
-/**
- * - * ObjectRelationalBridge field conversion. - *
- * Helps transparently map Locale objects into a database table - * that contains country, langauge and variant field and vice versa. - * - * field should be tokenized with commas - */ -public class LocaleFieldConversion implements FieldConversion -{ - private static final String DELIM = ","; - - /** - * @see org.apache.ojb.broker.accesslayer.conversions.FieldConversion#javaToSql(java.lang.Object) - */ - public Object javaToSql(Object arg0) throws ConversionException - { - if (arg0 instanceof Locale) - { - - Locale locale = (Locale) arg0; - String country = locale.getCountry(); - String language = locale.getLanguage(); - String variant = locale.getVariant(); - StringBuffer buffer = new StringBuffer(40); - if (language != null) - { - buffer.append(language); - } - buffer.append(DELIM); - - if (country != null) - { - buffer.append(country); - } - buffer.append(DELIM); - - if (variant != null) - { - buffer.append(variant); - } - - return buffer.toString().trim(); - } - else - { - return arg0; - } - } - - /** - * @see org.apache.ojb.broker.accesslayer.conversions.FieldConversion#sqlToJava(java.lang.Object) - */ - public Object sqlToJava(Object arg0) throws ConversionException - { - if (arg0 instanceof String) - { - - String localeString = (String) arg0; - StringTokenizer tokenizer = new StringTokenizer(localeString, DELIM); - - - String language = tokenizer.nextToken().trim(); - String country = null; - String variant = null; - if(tokenizer.hasMoreTokens()) - { - country = tokenizer.nextToken().trim(); - } - - if(tokenizer.hasMoreTokens()) - { - variant = tokenizer.nextToken().trim(); - } - - - if (country != null && language != null && variant != null) - { - return new Locale (language, country, variant); - } - else if (country != null && language != null) - { - return new Locale(language, country); - } - else if (language != null) - { - return new Locale(language, ""); // JDK 1.3 compatibility - } - else - { - return Locale.getDefault(); - } - } - else - { - return arg0; - } - - } - -} Index: components/persistence/src/java/org/apache/jetspeed/util/ojb/ObjectIDtoLongFieldConversion.java =================================================================== RCS file: components/persistence/src/java/org/apache/jetspeed/util/ojb/ObjectIDtoLongFieldConversion.java diff -N components/persistence/src/java/org/apache/jetspeed/util/ojb/ObjectIDtoLongFieldConversion.java --- components/persistence/src/java/org/apache/jetspeed/util/ojb/ObjectIDtoLongFieldConversion.java 24 Apr 2004 19:05:54 -0000 1.3 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,69 +0,0 @@ -/* - * Copyright 2000-2004 The Apache Software Foundation. - * - * Licensed under the Apache 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.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.apache.jetspeed.util.ojb; - -import org.apache.jetspeed.util.JetspeedObjectID; -import org.apache.ojb.broker.accesslayer.conversions.ConversionException; -import org.apache.ojb.broker.accesslayer.conversions.FieldConversion; - -/** - *- * ObjectRelationalBridge field conversion. - *
- * - * Converts betweenlong and ObjectID
- *
- * @author Scott T. Weaver
- */
-public class ObjectIDtoLongFieldConversion implements FieldConversion
-{
-
- /**
- * @see org.apache.ojb.broker.accesslayer.conversions.FieldConversion#javaToSql(java.lang.Object)
- */
- public Object javaToSql(Object arg0) throws ConversionException
- {
- if (arg0 instanceof JetspeedObjectID)
- {
- JetspeedObjectID oid = (JetspeedObjectID) arg0;
-
- return new Long(oid.longValue());
- }
- else
- {
- return arg0;
- }
-
- }
-
- /**
- * @see org.apache.ojb.broker.accesslayer.conversions.FieldConversion#sqlToJava(java.lang.Object)
- */
- public Object sqlToJava(Object arg0) throws ConversionException
- {
- if (arg0 instanceof Number)
- {
-
- return new JetspeedObjectID(((Number)arg0).longValue());
- }
- else
- {
- return arg0;
- }
-
- }
-
-}
Index: components/persistence/src/java/org/apache/jetspeed/util/ojb/ObjectIDtoStringFieldConversion.java
===================================================================
RCS file: components/persistence/src/java/org/apache/jetspeed/util/ojb/ObjectIDtoStringFieldConversion.java
diff -N components/persistence/src/java/org/apache/jetspeed/util/ojb/ObjectIDtoStringFieldConversion.java
--- components/persistence/src/java/org/apache/jetspeed/util/ojb/ObjectIDtoStringFieldConversion.java 8 Mar 2004 00:47:07 -0000 1.2
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,68 +0,0 @@
-/*
- * Copyright 2000-2004 The Apache Software Foundation.
- *
- * Licensed under the Apache 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.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.jetspeed.util.ojb;
-
-import org.apache.jetspeed.util.JetspeedObjectID;
-import org.apache.ojb.broker.accesslayer.conversions.ConversionException;
-import org.apache.ojb.broker.accesslayer.conversions.FieldConversion;
-
-/**
- * - * ObjectRelationalBridge field conversion. - *
- * - * Converts betweenlong and ObjectID
- *
- * @author Scott T. Weaver
- */
-public class ObjectIDtoStringFieldConversion implements FieldConversion
-{
-
- /**
- * @see org.apache.ojb.broker.accesslayer.conversions.FieldConversion#javaToSql(java.lang.Object)
- */
- public Object javaToSql(Object arg0) throws ConversionException
- {
- if (arg0 instanceof JetspeedObjectID)
- {
- JetspeedObjectID oid = (JetspeedObjectID) arg0;
-
- return oid.toString();
- }
- else
- {
- return arg0;
- }
-
- }
-
- /**
- * @see org.apache.ojb.broker.accesslayer.conversions.FieldConversion#sqlToJava(java.lang.Object)
- */
- public Object sqlToJava(Object arg0) throws ConversionException
- {
- if (arg0 instanceof String)
- {
- return JetspeedObjectID.createFromString((String)arg0);
- }
- else
- {
- return arg0;
- }
-
- }
-
-}
Index: components/prefs/src/java/org/apache/jetspeed/prefs/om/Node.java
===================================================================
RCS file: components/prefs/src/java/org/apache/jetspeed/prefs/om/Node.java
diff -N components/prefs/src/java/org/apache/jetspeed/prefs/om/Node.java
--- components/prefs/src/java/org/apache/jetspeed/prefs/om/Node.java 5 May 2004 18:32:43 -0000 1.3
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,148 +0,0 @@
-/* Copyright 2004 Apache Software Foundation
- *
- * Licensed under the Apache 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.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.jetspeed.prefs.om;
-
-import java.io.Serializable;
-import java.util.Collection;
-import java.sql.Timestamp;
-
-/**
- * Interface representing a {@link java.util.prefs.Preferences} - * node.
- * - * @author David Le Strat - */ -public interface Node extends Serializable, Cloneable -{ - - /** - *Getter for the node id.
- * @return The node id. - */ - long getNodeId(); - - /** - *Setter for the node id.
- * @param nodeId The node id. - */ - void setNodeId(long nodeId); - - /** - *Getter for the parent node id.
- *Passed as an Integer to be able to pass null if no parent - * is associated to a node.
- * @return The parent node id. - */ - Long getParentNodeId(); - - /** - *Setter for the parent node id.
- * @param parentNodeId The parent node id. - */ - void setParentNodeId(Long parentNodeId); - - /** - *Getter for the node properties.
- * @return The node properties. - */ - Collection getNodeProperties(); - - /** - *Setter for the node properties.
- * @param properties The node properties. - */ - void setNodeProperties(Collection nodeProperties); - - /** - *Getter for the keys associated to a specific nodes.
- * @return The node keys. - */ - Collection getNodeKeys(); - - /** - *Setter for the keys associated to a specific nodes.
- * @param nodeKeys The node keys. - */ - void setNodeKeys(Collection nodeKeys); - - /** - *Getter for the node name.
- * @return The node name. - */ - String getNodeName(); - - /** - *Setter for the node name.
- * @param nodeName The node name. - */ - void setNodeName(String nodeName); - - /** - *Getter for the node type.
- *Setter for the node type.
- *Getter for the full path.
- * @return The full path. - */ - String getFullPath(); - - /** - *Setter for the full path.
- * @param fullPath The full path. - */ - void setFullPath(String fullPath); - - /** - *Getter for creation date.
- * @return The creation date. - */ - Timestamp getCreationDate(); - - /** - *Setter for the creation date.
- * @param creationDate The creation date. - */ - void setCreationDate(Timestamp creationDate); - - /** - *Getter for the modified date.
- * @return The modified date. - */ - Timestamp getModifiedDate(); - - /** - *Setter for the modified date.
- * @param modifiedDate The modified date. - */ - void setModifiedDate(Timestamp modifiedDate); - -} Index: components/prefs/src/java/org/apache/jetspeed/prefs/om/Property.java =================================================================== RCS file: components/prefs/src/java/org/apache/jetspeed/prefs/om/Property.java diff -N components/prefs/src/java/org/apache/jetspeed/prefs/om/Property.java --- components/prefs/src/java/org/apache/jetspeed/prefs/om/Property.java 5 May 2004 18:32:43 -0000 1.2 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,191 +0,0 @@ -/* Copyright 2004 Apache Software Foundation - * - * Licensed under the Apache 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.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.apache.jetspeed.prefs.om; - -import java.io.Serializable; -import java.sql.Timestamp; - -/** - *Interface representing a property key/value pair.
- * - * @author David Le Strat - */ -public interface Property extends Serializable, Cloneable -{ - - /**Constant for boolean property value object type.
Constant for long property value object type.
Constant for double property value object type.
Constant for String property value object type.
Constant for Timestamp property value object type.
Getter for the property value id.
- * @return The property value id. - */ - long getPropertyValueId(); - - /** - *Setter for the property value id.
- * @param propertyValueId The property value id. - */ - void setPropertyValueId(long propertyValueId); - - /** - *Getter for the node id.
- * @return The node id. - */ - long getNodeId(); - - /** - *Setter for the node id.
- * @param nodeId The node id. - */ - void setNodeId(long nodeId); - - /** - *Getter for the node id.
- * @return The property key id. - */ - long getPropertyKeyId(); - - /** - *Setter for the property key id.
- * @param propertyKeyId The property key id. - */ - void setPropertyKeyId(long propertyKeyId); - - /** - *Getter for the property key object.
- * @return The property key object. - */ - PropertyKey getPropertyKey(); - - /** - *Setter for the property key object.
- * @param propertyKey The property key object. - */ - void setPropertyKey(PropertyKey propertyKey); - - /** - *Utility method used to return the property value - * as a String.
- * @param valueObjectType The value object type. - * @return The property value as a String. - */ - String getPropertyValue(int valueObjectType); - - /** - *Utility method used to identify with property value to set - * based on the value object type.
- * @param valueObjectType The value object type. - * @param valueObject The value object. - */ - void setPropertyValue(int valueObjectType, String valueObject); - - /** - *Getter for the boolean property value.
- * @return The boolean property value. - */ - boolean getBooleanPropertyValue(); - - /** - *Setter for the boolean property value.
- * @param booleanPropertyValue The boolean property value. - */ - void setBooleanPropertyValue(boolean booleanPropertyValue); - - /** - *Getter for the date property value.
- * @return The date property value. - */ - Timestamp getDatePropertyValue(); - - /** - *Setter for the date property value.
- * @param datePropertyValue The date property value. - */ - void setDatePropertyValue(Timestamp datePropertyValue); - - /** - *Getter for the long property value.
- * @return The long property value. - */ - long getLongPropertyValue(); - - /** - *Setter for the long property value.
- * @param longPropertyValue The long property value. - */ - void setLongPropertyValue(long longPropertyValue); - - /** - *Getter for the double property value.
- * @return The double property value. - */ - double getDoublePropertyValue(); - - /** - *Setter for the double property value.
- * @param doublePropertyValue The double property value. - */ - void setDoublePropertyValue(double doublePropertyValue); - - /** - *Getter for the text property value.
- * @return The text property value. - */ - String getTextPropertyValue(); - - /** - *Setter for the text property value.
- * @param textPropertyValue The text property value. - */ - void setTextPropertyValue(String textPropertyValue); - - /** - *Getter for creation date.
- * @return The creation date. - */ - Timestamp getCreationDate(); - - /** - *Setter for the creation date.
- * @param creationDate The creation date. - */ - void setCreationDate(Timestamp creationDate); - - /** - *Getter for the modified date.
- * @return The modified date. - */ - Timestamp getModifiedDate(); - - /** - *Setter for the modified date.
- * @param modifiedDate The modified date. - */ - void setModifiedDate(Timestamp modifiedDate); - -} Index: components/prefs/src/java/org/apache/jetspeed/prefs/om/PropertyKey.java =================================================================== RCS file: components/prefs/src/java/org/apache/jetspeed/prefs/om/PropertyKey.java diff -N components/prefs/src/java/org/apache/jetspeed/prefs/om/PropertyKey.java --- components/prefs/src/java/org/apache/jetspeed/prefs/om/PropertyKey.java 5 May 2004 18:32:43 -0000 1.3 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,102 +0,0 @@ -/* Copyright 2004 Apache Software Foundation - * - * Licensed under the Apache 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.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.apache.jetspeed.prefs.om; - -import java.io.Serializable; -import java.sql.Timestamp; - -/** - *Interface representing a property key.
- * - * @author David Le Strat - */ -public interface PropertyKey extends Serializable, Cloneable -{ - - /** - *Getter for the property key id.
- * @return The property key id. - */ - long getPropertyKeyId(); - - /** - *Setter for the property key id.
- * @param propertyKeyId The property key id. - */ - void setPropertyKeyId(long propertyKeyId); - - /** - *Getter for the property key name.
- * @return The property key name. - */ - String getPropertyKeyName(); - - /** - *Setter for the property key name.
- * @param propertyKeyName The property key name. - */ - void setPropertyKeyName(String propertyKeyName); - - /** - *Getter for the property key type.
- *Setter for the property key type.
- *Getter for creation date.
- * @return The creation date. - */ - Timestamp getCreationDate(); - - /** - *Setter for the creation date.
- * @param creationDate The creation date. - */ - void setCreationDate(Timestamp creationDate); - - /** - *Getter for the modified date.
- * @return The modified date. - */ - Timestamp getModifiedDate(); - - /** - *Setter for the modified date.
- * @param modifiedDate The modified date. - */ - void setModifiedDate(Timestamp modifiedDate); - -} Index: components/prefs/src/java/org/apache/jetspeed/prefs/om/package.html =================================================================== RCS file: components/prefs/src/java/org/apache/jetspeed/prefs/om/package.html diff -N components/prefs/src/java/org/apache/jetspeed/prefs/om/package.html --- components/prefs/src/java/org/apache/jetspeed/prefs/om/package.html 26 Feb 2004 04:30:46 -0000 1.1 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,12 +0,0 @@ - - -Interface used for the object model backing Jetspeed - java.util.prefs.Preferences. These objects - are used through OJB for persisting data.
- - - Index: components/prefs/src/java/org/apache/jetspeed/prefs/om/impl/NodeImpl.java =================================================================== RCS file: components/prefs/src/java/org/apache/jetspeed/prefs/om/impl/NodeImpl.java diff -N components/prefs/src/java/org/apache/jetspeed/prefs/om/impl/NodeImpl.java --- components/prefs/src/java/org/apache/jetspeed/prefs/om/impl/NodeImpl.java 5 May 2004 18:32:43 -0000 1.4 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,239 +0,0 @@ -/* Copyright 2004 Apache Software Foundation - * - * Licensed under the Apache 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.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.apache.jetspeed.prefs.om.impl; - -import java.util.ArrayList; -import java.util.Collection; -import java.sql.Timestamp; - -import org.apache.jetspeed.prefs.om.Node; - -/** - *{@link Node} interface implementation.
- *Represents a preferences node.
- * - * @author David Le Strat - */ -public class NodeImpl implements Node -{ - private long nodeId; - private Long parentNodeId; - private Collection nodeProperties; - private Collection nodeKeys; - private String nodeName; - private int nodeType; - private String fullPath; - private Timestamp creationDate; - - /** - *Preferences node implementation default constructor.
- */ - public NodeImpl() - { - } - - /** - *Node constructor given:
- *Convert Node to string.
{@link Property} interface implementation.
- *Represents a property key/value pair.
- * - * @author David Le Strat - */ -public class PropertyImpl implements Property -{ - private long nodeId; - private long propertyValueId; - private long propertyKeyId; - - /** - *Property implementation default constructor.
- */ - public PropertyImpl() - { - } - - /** - * Property constructor given a property key id, node id - * and the appropriate value object type and value: - * - *Convert Property to string.
{@link PropertyKey} interface implementation.
- *Represents a property key.
- * - * @author David Le Strat - */ -public class PropertyKeyImpl implements PropertyKey -{ - private long propertyKeyId; - private int propertyKeyType; - - /** - *Property key implementation default constructor.
- */ - public PropertyKeyImpl() - { - } - - /** - *Property key constructor given the associated - * property set definition, the property key name and type.
- * @param propertyKeyName The property key name. - * @param propertyKeyType The property key type. - */ - public PropertyKeyImpl(String propertyKeyName, - int propertyKeyType) - { - this.propertyKeyName = propertyKeyName; - this.propertyKeyType = propertyKeyType; - this.creationDate = new Timestamp(System.currentTimeMillis()); - this.modifiedDate = this.creationDate; - } - - - /** - * @see org.apache.jetspeed.prefs.om.PropertyKey#getPropertyKeyId() - */ - public long getPropertyKeyId() - { - return this.propertyKeyId; - } - - /** - * @see org.apache.jetspeed.prefs.om.PropertyKey#setPropertyKeyId(int) - */ - public void setPropertyKeyId(long propertyKeyId) - { - this.propertyKeyId = propertyKeyId; - } - - private String propertyKeyName; - - /** - * @see org.apache.jetspeed.prefs.om.PropertyKey#getPropertyKeyName() - */ - public String getPropertyKeyName() - { - return this.propertyKeyName; - } - - /** - * @see org.apache.jetspeed.prefs.om.PropertyKey#setPropertyKeyName(java.lang.String) - */ - public void setPropertyKeyName(String propertyKeyName) - { - this.propertyKeyName = propertyKeyName; - } - - /** - * @see org.apache.jetspeed.prefs.om.PropertyKey#getPropertyKeyType() - */ - public int getPropertyKeyType() - { - return this.propertyKeyType; - } - - /** - * @see org.apache.jetspeed.prefs.om.PropertyKey#setPropertyKeyType(int) - */ - public void setPropertyKeyType(int propertyKeyType) - { - this.propertyKeyType = propertyKeyType; - } - - private Timestamp creationDate; - - /** - * @see org.apache.jetspeed.prefs.om.PropertyKey#getCreationDate() - */ - public Timestamp getCreationDate() - { - return this.creationDate; - } - - /** - * @see org.apache.jetspeed.prefs.om.PropertyKey#setCreationDate(java.sql.Timestamp) - */ - public void setCreationDate(Timestamp creationDate) - { - this.creationDate = creationDate; - } - - private Timestamp modifiedDate; - - /** - * @see org.apache.jetspeed.prefs.om.PropertyKey#getModifiedDate() - */ - public Timestamp getModifiedDate() - { - return this.modifiedDate; - } - - /** - * @see org.apache.jetspeed.prefs.om.PropertyKey#setModifiedDate(java.sql.Timestamp) - */ - public void setModifiedDate(Timestamp modifiedDate) - { - this.modifiedDate = modifiedDate; - } - - /** - *Convert PropertyKey to string.
Implementation for the object model backing Jetspeed - java.util.prefs.Preferences. These objects - are used through OJB for persisting data.
- - - Index: components/registry/src/java/META-INF/ojb_repository.xml =================================================================== RCS file: /home/cvspublic/jakarta-jetspeed-2/components/registry/src/java/META-INF/ojb_repository.xml,v retrieving revision 1.3 diff -u -r1.3 ojb_repository.xml --- components/registry/src/java/META-INF/ojb_repository.xml 22 May 2004 17:39:19 -0000 1.3 +++ components/registry/src/java/META-INF/ojb_repository.xml 28 May 2004 11:14:15 -0000 @@ -435,7 +435,7 @@