Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

[maven-release-plugin] copy for tag shindig-project-2.5.0-update1

  • Loading branch information...
commit 5f726ba812ae69706d9625c9ada219b5ad94a2c4 2 parents 8f4f6cb + 88cdac5
Ryan Baxter ryanjbaxter authored
8 java/common/src/main/java/org/apache/shindig/protocol/DataCollection.java
View
@@ -24,17 +24,17 @@
* Wrapper class used for data responses.
*/
public class DataCollection {
- private Map<String, Map<String, String>> entry;
+ private Map<String, Map<String, Object>> entry;
- public DataCollection(Map<String, Map<String, String>> entry) {
+ public DataCollection(Map<String, Map<String, Object>> entry) {
this.entry = entry;
}
- public Map<String, Map<String, String>> getEntry() {
+ public Map<String, Map<String, Object>> getEntry() {
return entry;
}
- public void setEntry(Map<String, Map<String, String>> entry) {
+ public void setEntry(Map<String, Map<String, Object>> entry) {
this.entry = entry;
}
16 java/common/src/main/java/org/apache/shindig/protocol/conversion/xstream/DataCollectionConverter.java
View
@@ -67,21 +67,21 @@ public boolean canConvert(Class clazz) {
public void marshal(Object source, HierarchicalStreamWriter writer, MarshallingContext context) {
DataCollection collection = (DataCollection) source;
- Map<String, Map<String, String>> internalMap = collection.getEntry();
+ Map<String, Map<String, Object>> internalMap = collection.getEntry();
- for (Entry<String, Map<String, String>> eo : internalMap.entrySet()) {
+ for (Entry<String, Map<String, Object>> eo : internalMap.entrySet()) {
writer.startNode("entry");
writer.startNode("key");
writer.setValue(eo.getKey());
writer.endNode();
writer.startNode("value");
- for (Entry<String, String> ei : eo.getValue().entrySet()) {
+ for (Entry<String, Object> ei : eo.getValue().entrySet()) {
writer.startNode("entry");
writer.startNode("key");
writer.setValue(ei.getKey());
writer.endNode();
writer.startNode("value");
- writer.setValue(ei.getValue());
+ writer.setValue(ei.getValue().toString());
writer.endNode();
writer.endNode();
}
@@ -150,14 +150,14 @@ public Object unmarshal(HierarchicalStreamReader reader,
nonmap = true;
}
}
- Map<String, Map<String, String>> fm = Maps.newHashMap();
+ Map<String, Map<String, Object>> fm = Maps.newHashMap();
if (nonmap) {
for (Entry<String, Object> e : m.entrySet()) {
if (e.getValue() instanceof Map) {
- fm.put(e.getKey(), (Map<String, String>) e.getValue());
+ fm.put(e.getKey(), (Map<String, Object>) e.getValue());
} else {
// not certain that this makes sense, but can't see how else.
- Map<String, String> mv = Maps.newHashMap();
+ Map<String, Object> mv = Maps.newHashMap();
mv.put(e.getKey(), (String) e.getValue());
fm.put(e.getKey(), mv);
}
@@ -165,7 +165,7 @@ public Object unmarshal(HierarchicalStreamReader reader,
} else {
for (Entry<String, Object> e : m.entrySet()) {
- fm.put(e.getKey(), (Map<String, String>) e.getValue());
+ fm.put(e.getKey(), (Map<String, Object>) e.getValue());
}
}
return new DataCollection(fm);
6 java/common/src/test/java/org/apache/shindig/protocol/DataCollectionTest.java
View
@@ -29,12 +29,12 @@
@Test
public void testBasicMethods() throws Exception {
- Map<String, Map<String, String>> entry = Maps.newHashMap();
+ Map<String, Map<String, Object>> entry = Maps.newHashMap();
DataCollection collection = new DataCollection(entry);
assertEquals(entry, collection.getEntry());
- Map<String, Map<String, String>> newEntry = Maps.newHashMap();
- Map<String, String> value = Maps.newHashMap();
+ Map<String, Map<String, Object>> newEntry = Maps.newHashMap();
+ Map<String, Object> value = Maps.newHashMap();
value.put("knock knock", "who's there?");
value.put("banana", "banana who?");
value.put("banana!", "banana who?");
6 java/gadgets/src/main/java/org/apache/shindig/gadgets/oauth2/BasicOAuth2Request.java
View
@@ -243,9 +243,9 @@ private HttpResponseBuilder attemptFetch(final OAuth2Accessor accessor) {
BasicOAuth2Request.LOG.entering(BasicOAuth2Request.LOG_CLASS, "attemptFetch",
new Object[] { accessor });
BasicOAuth2Request.LOG.log("BasicOAuth2Request.haveAccessToken(accessor) = {0}",
- BasicOAuth2Request.haveAccessToken(accessor) == null);
+ BasicOAuth2Request.haveAccessToken(accessor) != null);
BasicOAuth2Request.LOG.log("BasicOAuth2Request.haveRefreshToken(accessor) = {0}",
- BasicOAuth2Request.haveRefreshToken(accessor) == null);
+ BasicOAuth2Request.haveRefreshToken(accessor) != null);
}
if (this.attemptCounter > BasicOAuth2Request.MAX_ATTEMPTS) {
@@ -759,7 +759,7 @@ private static String getCompleteRefreshUrl(final String refreshUrl) {
private HttpResponseBuilder getErrorResponseBuilder(final Throwable t, final OAuth2Error error,
final String contextMessage) {
- return this.getErrorResponseBuilder(t, error, contextMessage);
+ return this.getErrorResponseBuilder(t, error, contextMessage, null, null);
}
private HttpResponseBuilder getErrorResponseBuilder(final Throwable t, final OAuth2Error error,
2  java/social-api/src/main/java/org/apache/shindig/social/core/model/MessageImpl.java
View
@@ -27,7 +27,7 @@
/**
* Default implementation for a {@link org.apache.shindig.social.opensocial.model.Message}
*/
-public final class MessageImpl implements Message {
+public class MessageImpl implements Message {
private String appUrl;
private String body;
2  java/social-api/src/main/java/org/apache/shindig/social/core/util/atom/AtomFeed.java
View
@@ -97,7 +97,7 @@ public AtomFeed(Object obj) {
} else if ( obj instanceof DataCollection ) {
DataCollection dc = (DataCollection) obj;
entry = Lists.newArrayList();
- for ( Entry<String, Map<String,String>> o : dc.getEntry().entrySet()) {
+ for ( Entry<String, Map<String,Object>> o : dc.getEntry().entrySet()) {
entry.add(new AtomEntry(o));
}
startIndex = 0;
4 java/social-api/src/main/java/org/apache/shindig/social/sample/spi/JsonDbOpensocialService.java
View
@@ -498,7 +498,7 @@ protected boolean viewerCanUpdatePerson(String viewer, String person) {
public Future<DataCollection> getPersonData(Set<UserId> userIds, GroupId groupId, String appId,
Set<String> fields, SecurityToken token) throws ProtocolException {
try {
- Map<String, Map<String, String>> idToData = Maps.newHashMap();
+ Map<String, Map<String, Object>> idToData = Maps.newHashMap();
Set<String> idSet = getIdSet(userIds, groupId, token);
for (String id : idSet) {
JSONObject personData;
@@ -518,7 +518,7 @@ protected boolean viewerCanUpdatePerson(String viewer, String person) {
// JSONObject keys are always strings
@SuppressWarnings("unchecked")
Iterator<String> keys = personData.keys();
- Map<String, String> data = Maps.newHashMap();
+ Map<String, Object> data = Maps.newHashMap();
while (keys.hasNext()) {
String key = keys.next();
data.put(key, personData.getString(key));
2  java/social-api/src/test/java/org/apache/shindig/social/sample/spi/JsonDbOpensocialServiceTest.java
View
@@ -289,7 +289,7 @@ public void testUpdateExpectedAppData() throws Exception {
assertTrue(responseItem.getEntry().get(CANONICAL_USER_ID).containsKey("newvalue"));
assertEquals("20", responseItem.getEntry().get(CANONICAL_USER_ID).get("newvalue"));
assertTrue(responseItem.getEntry().get(CANONICAL_USER_ID).containsKey("isValid"));
- assertEquals(true, Boolean.valueOf(responseItem.getEntry().get(CANONICAL_USER_ID).get("isValid")));
+ assertEquals(true, Boolean.valueOf(responseItem.getEntry().get(CANONICAL_USER_ID).get("isValid").toString()));
}
@Test
Please sign in to comment.
Something went wrong with that request. Please try again.