Commit 472b4c5a authored by Gaston Dombiak's avatar Gaston Dombiak Committed by gato

Review of API

git-svn-id: http://svn.igniterealtime.org/svn/repos/openfire/trunk@9512 b35dd754-fafc-0310-a699-88a17e54d16e
parent 78b8fe04
......@@ -11,6 +11,10 @@
package org.jivesoftware.openfire.entitycaps;
import org.jivesoftware.util.cache.CacheSizes;
import org.jivesoftware.util.cache.Cacheable;
import org.jivesoftware.util.cache.ExternalizableUtil;
import java.io.Externalizable;
import java.io.IOException;
import java.io.ObjectInput;
......@@ -18,10 +22,6 @@ import java.io.ObjectOutput;
import java.util.HashSet;
import java.util.Set;
import org.jivesoftware.util.cache.CacheSizes;
import org.jivesoftware.util.cache.Cacheable;
import org.jivesoftware.util.cache.ExternalizableUtil;
/**
* Contains identities and supported features describing client capabilities
* for an entity.
......@@ -55,7 +55,7 @@ public class EntityCapabilities implements Cacheable, Externalizable {
* @return true if the entity capabilities did not already include the
* identity
*/
public boolean addIdentity(String identity) {
boolean addIdentity(String identity) {
return identities.add(identity);
}
......@@ -66,7 +66,7 @@ public class EntityCapabilities implements Cacheable, Externalizable {
* @return true if the entity capabilities did not already include the
* feature
*/
public boolean addFeature(String feature) {
boolean addFeature(String feature) {
return features.add(feature);
}
......@@ -74,11 +74,12 @@ public class EntityCapabilities implements Cacheable, Externalizable {
* Determines whether or not a given identity is included in these entity
* capabilities.
*
* @param identity the identity
* @param category the category of the identity
* @param type the type of the identity
* @return true if identity is included, false if not
*/
public boolean containsIdentity(String identity) {
return identities.contains(identity);
public boolean containsIdentity(String category, String type) {
return identities.contains(category + "/" + type);
}
/**
......@@ -92,17 +93,10 @@ public class EntityCapabilities implements Cacheable, Externalizable {
return features.contains(feature);
}
/**
* @return the verAttribute
*/
public String getVerAttribute() {
return verAttribute;
}
/**
* @param verAttribute the verAttribute to set
*/
public void setVerAttribute(String verAttribute) {
void setVerAttribute(String verAttribute) {
this.verAttribute = verAttribute;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment