weaver 2004/07/16 12:30:14
Added: jetspeed-api/src/java/org/apache/jetspeed/prefs
PropertyManager.java package.html
PreferencesProvider.java
Removed: components/prefs/src/java/org/apache/jetspeed/prefs
PreferencesProvider.java PropertyManager.java
package.html
Log:
property and prefs interfaces moved to jetspeed-api
Revision Changes Path
1.1
jakarta-jetspeed-2/jetspeed-api/src/java/org/apache/jetspeed/prefs/PropertyManager.java
Index: PropertyManager.java
===================================================================
/* 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;
import java.util.Collection;
import java.util.Map;
import java.util.prefs.Preferences;
/**
* <p>Service used to manage property and property set definition.<p>
* <p>A property set definition defines a property set and the possible
* properties assigned to that set. All or a subset of the property
* set definition properties can be assigned to a node.<p>
*
* @author <a href="mailto:[EMAIL PROTECTED]">David Le Strat</a>
*/
public interface PropertyManager
{
/** The name of the service. */
String SERVICE_NAME = "PropertyManager";
/**
* <p>Add a set of property keys to a [EMAIL PROTECTED] Preferences} node. Only
* keys added to a node can be set on the [EMAIL PROTECTED] Preferences}
node.</p>
* <p>Property keys should be passed as a map of:</p>
* <ul>
* <li><code>PROPERTYKEY_NAME</code>: The property key name of type
* <code>java.lang.String</code>.</li>
* <li><code>PROPERTYKEY_TYPE</code>: The property key type of type
* <code>java.lang.Short</code>.</li>
* </ul>
* <p>The Map of [PROPERTYKEY_NAME, PROPERTYKEY_TYPE] of properties to be
* added to the [EMAIL PROTECTED] Preferences} is passed to the method.</p>
* <p>The property names associated to a node must be unique.</p>
* @param prefNode The [EMAIL PROTECTED] Preferences} node.
* @param propertyKeys A map property key name / key type.
* @throws PropertyException Thrown if any property in the
* set in already assigned to a property set
* definition.
*/
void addPropertyKeys(Preferences prefNode, Map propertyKeysMap) throws
PropertyException;
/**
* <p>Returns the property keys available to a [EMAIL PROTECTED] Preferences}
node whether
* or node those keys have values assigned to them.</p>
* <p>Property keys will be returned as a map of:</p>
* <ul>
* <li><code>PROPERTYKEY_NAME</code>: The property key name of type
* <code>java.lang.String</code>.</li>
* <li><code>PROPERTYKEY_TYPE</code>: The property key type of type
* <code>java.lang.Short</code>.</li>
* </ul>
* @param prefNode The [EMAIL PROTECTED] Preferences} node.
* @return The map of property keys names / types.
*/
Map getPropertyKeys(Preferences prefNode);
/**
* <p>Remove the specified collection of property keys from the given
preferences node.</p>
* @param prefNode The [EMAIL PROTECTED] Preferences} node.
* @param propertyKeys A collection of property key names.
* @throws PropertyException Throws if delete fails.
*/
void removePropertyKeys(Preferences prefNode, Collection propertyKeys) throws
PropertyException;
/**
* <p>Update a property key.</p>
* @param oldPropertyKeyName The old property key name.
* @param prefNode The [EMAIL PROTECTED] Preferences} node.
* @param newPropertyKey The property key name / type map used to
* update the old property.
* @throws PropertyException Throws if update fails.
*/
void updatePropertyKey(String oldPropertyKeyName, Preferences prefNode, Map
newPropertyKey)
throws PropertyException;
}
1.1
jakarta-jetspeed-2/jetspeed-api/src/java/org/apache/jetspeed/prefs/package.html
Index: package.html
===================================================================
<html>
<head>
<title>org.apache.jetspeed.om.usermgt</title>
</head>
<body>
<p>Interface for the services backing Jetspeed
java.util.prefs.Preferences.</p>
</body>
</html>
1.1
jakarta-jetspeed-2/jetspeed-api/src/java/org/apache/jetspeed/prefs/PreferencesProvider.java
Index: PreferencesProvider.java
===================================================================
/* 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;
import java.util.prefs.Preferences;
import org.apache.jetspeed.components.persistence.store.PersistenceStore;
/**
* <p>Utility component used to pass the [EMAIL PROTECTED]
PersistenceStoreContainer} and
* store name to the [EMAIL PROTECTED] Preferences} SPI implementation.</p>
*
* @author <a href="mailto:[EMAIL PROTECTED]">David Le Strat</a>
*/
public interface PreferencesProvider
{
PersistenceStore getPersistenceStore();
boolean isPropertyManagerEnabled();
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]