mirror of
https://codeberg.org/Mercury-IM/Smack
synced 2025-12-05 12:41:08 +01:00
First round of refactoring.
git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/trunk@2371 b35dd754-fafc-0310-a699-88a17e54d16e
This commit is contained in:
parent
cf47ba95af
commit
280c4b5a76
23 changed files with 2102 additions and 371 deletions
|
|
@ -0,0 +1,59 @@
|
|||
/**
|
||||
* $RCSfile$
|
||||
* $Revision$
|
||||
* $Date$
|
||||
*
|
||||
* Copyright (C) 1999-2003 Jive Software. All rights reserved.
|
||||
*
|
||||
* This software is the proprietary information of Jive Software.
|
||||
* Use is subject to license terms.
|
||||
*/
|
||||
|
||||
package org.jivesoftware.smackx.workgroup.packet;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import org.jivesoftware.smackx.workgroup.util.MetaDataUtils;
|
||||
|
||||
import org.jivesoftware.smack.packet.PacketExtension;
|
||||
|
||||
/**
|
||||
* MetaData packet extension.
|
||||
*/
|
||||
public class MetaData implements PacketExtension {
|
||||
|
||||
/**
|
||||
* Element name of the packet extension.
|
||||
*/
|
||||
public static final String ELEMENT_NAME = "metadata";
|
||||
|
||||
/**
|
||||
* Namespace of the packet extension.
|
||||
*/
|
||||
public static final String NAMESPACE = "http://www.jivesoftware.com/workgroup/metadata";
|
||||
|
||||
private Map metaData;
|
||||
|
||||
public MetaData(Map metaData) {
|
||||
this.metaData = metaData;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the Map of metadata contained by this instance
|
||||
*/
|
||||
public Map getMetaData() {
|
||||
return metaData;
|
||||
}
|
||||
|
||||
public String getElementName() {
|
||||
return ELEMENT_NAME;
|
||||
}
|
||||
|
||||
public String getNamespace() {
|
||||
return NAMESPACE;
|
||||
}
|
||||
|
||||
public String toXML() {
|
||||
return MetaDataUtils.encodeMetaData(this.getMetaData());
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue