Author: ajaquith
Date: Wed Jun 11 23:28:22 2008
New Revision: 666975
URL: http://svn.apache.org/viewvc?rev=666975&view=rev
Log:
Minor tightening of Map API for Serializer methods; the keys are now Strings
rather than Serializable. This is a dev branch, remember!
Modified:
incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/auth/user/AbstractUserDatabase.java
incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/auth/user/DefaultUserProfile.java
incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/auth/user/JDBCUserDatabase.java
incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/auth/user/UserProfile.java
incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/auth/user/XMLUserDatabase.java
Modified:
incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/auth/user/AbstractUserDatabase.java
URL:
http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/auth/user/AbstractUserDatabase.java?rev=666975&r1=666974&r2=666975&view=diff
==============================================================================
---
incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/auth/user/AbstractUserDatabase.java
(original)
+++
incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/auth/user/AbstractUserDatabase.java
Wed Jun 11 23:28:22 2008
@@ -59,6 +59,7 @@
* @deprecated there is no need to call this method because the save,
rename and
* delete methods contain their own commit logic
*/
+ @SuppressWarnings("deprecation")
public synchronized void commit() throws WikiSecurityException
{ }
Modified:
incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/auth/user/DefaultUserProfile.java
URL:
http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/auth/user/DefaultUserProfile.java?rev=666975&r1=666974&r2=666975&view=diff
==============================================================================
---
incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/auth/user/DefaultUserProfile.java
(original)
+++
incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/auth/user/DefaultUserProfile.java
Wed Jun 11 23:28:22 2008
@@ -38,7 +38,7 @@
private static final String WHITESPACE = "\\s";
- private Map<Serializable,Serializable> m_attributes = new
HashMap<Serializable,Serializable>();
+ private Map<String,Serializable> m_attributes = new
HashMap<String,Serializable>();
private Date m_created = null;
@@ -262,6 +262,7 @@
* @param name the wiki name
* @deprecated This method will be removed in a future release.
*/
+ @SuppressWarnings("deprecation")
public void setWikiName( String name )
{
}
@@ -300,7 +301,7 @@
/**
* [EMAIL PROTECTED]
*/
- public Map<Serializable,Serializable> getAttributes()
+ public Map<String,Serializable> getAttributes()
{
return m_attributes;
}
Modified:
incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/auth/user/JDBCUserDatabase.java
URL:
http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/auth/user/JDBCUserDatabase.java?rev=666975&r1=666974&r2=666975&view=diff
==============================================================================
---
incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/auth/user/JDBCUserDatabase.java
(original)
+++
incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/auth/user/JDBCUserDatabase.java
Wed Jun 11 23:28:22 2008
@@ -877,7 +877,7 @@
{
try
{
- Map<? extends Serializable,? extends Serializable>
attributes = Serializer.deserializeFromBase64( rawAttributes );
+ Map<String,? extends Serializable> attributes =
Serializer.deserializeFromBase64( rawAttributes );
profile.getAttributes().putAll( attributes );
}
catch ( IOException e )
Modified:
incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/auth/user/UserProfile.java
URL:
http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/auth/user/UserProfile.java?rev=666975&r1=666974&r2=666975&view=diff
==============================================================================
--- incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/auth/user/UserProfile.java
(original)
+++ incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/auth/user/UserProfile.java
Wed Jun 11 23:28:22 2008
@@ -28,7 +28,7 @@
* Class for representing wiki user information, such as the login name, full
* name, wiki name, and e-mail address. Note that since 2.6 the wiki name is
* required to be automatically computed from the full name.
- * As of 2.8, user profiles can store custom key/value String attributes, and
store
+ * As of 2.8, user profiles can store custom key/value String/Serializable
attributes, and store
* a unique ID. Locks are checked by [EMAIL PROTECTED]
com.ecyrd.jspwiki.auth.AuthenticationManager};
* if a profile is locked, the user cannot log with that profile.
* @author Andrew Jaquith
@@ -43,7 +43,7 @@
* in the UserProfile.
* @return the attributes
*/
- public Map<Serializable,Serializable> getAttributes();
+ public Map<String,Serializable> getAttributes();
/**
* Returns the creation date.
@@ -187,6 +187,7 @@
/**
* Sets the unique identifier for the user profile. Note that UserDatabase
implementations
* are required <em>not</em> to change the unique identifier after the
initial save.
+ * @param uid the unique identifier to set
*/
public void setUid( long uid );
Modified:
incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/auth/user/XMLUserDatabase.java
URL:
http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/auth/user/XMLUserDatabase.java?rev=666975&r1=666974&r2=666975&view=diff
==============================================================================
---
incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/auth/user/XMLUserDatabase.java
(original)
+++
incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/auth/user/XMLUserDatabase.java
Wed Jun 11 23:28:22 2008
@@ -651,7 +651,7 @@
String serializedMap = extractText( attribute );
try
{
- Map<? extends Serializable,? extends Serializable> map
= Serializer.deserializeFromBase64( serializedMap );
+ Map<String,? extends Serializable> map =
Serializer.deserializeFromBase64( serializedMap );
profile.getAttributes().putAll( map );
}
catch ( IOException e )