mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Checkpoint for workflow features
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@3518 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -0,0 +1,149 @@
|
||||
package org.alfresco.web.bean.repository;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Collection;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
import org.alfresco.service.namespace.QName;
|
||||
|
||||
/**
|
||||
* Represents a transient node i.e. it is not and will not be present in the repository.
|
||||
* <p>
|
||||
* This type of node is typically used to drive rich lists where the Map implementation
|
||||
* is required for sorting columns.
|
||||
* </p>
|
||||
*
|
||||
* @author gavinc
|
||||
*/
|
||||
public class TransientMapNode extends TransientNode implements Map<String, Object>
|
||||
{
|
||||
private static final long serialVersionUID = 1120307465342597322L;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
* <p>
|
||||
* NOTE: The name is NOT automatically added to the map of properties,
|
||||
* if you need the name of this node to be in the map then add it to
|
||||
* the map passed in to this constructor.
|
||||
* </p>
|
||||
*
|
||||
* @param type The type this node will represent
|
||||
* @param name The name of the node
|
||||
* @param data The properties and associations this node will have
|
||||
*/
|
||||
public TransientMapNode(QName type, String name, Map<QName, Serializable> data)
|
||||
{
|
||||
super(type, name, data);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString()
|
||||
{
|
||||
return "Transient map node of type: " + getType() +
|
||||
"\nProperties: " + this.getProperties().toString();
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------
|
||||
// Map implementation - allows the Node bean to be accessed using JSF expression syntax
|
||||
|
||||
/**
|
||||
* @see java.util.Map#clear()
|
||||
*/
|
||||
public void clear()
|
||||
{
|
||||
getProperties().clear();
|
||||
}
|
||||
|
||||
/**
|
||||
* @see java.util.Map#containsKey(java.lang.Object)
|
||||
*/
|
||||
public boolean containsKey(Object key)
|
||||
{
|
||||
return getProperties().containsKey(key);
|
||||
}
|
||||
|
||||
/**
|
||||
* @see java.util.Map#containsValue(java.lang.Object)
|
||||
*/
|
||||
public boolean containsValue(Object value)
|
||||
{
|
||||
return getProperties().containsKey(value);
|
||||
}
|
||||
|
||||
/**
|
||||
* @see java.util.Map#entrySet()
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
public Set entrySet()
|
||||
{
|
||||
return getProperties().entrySet();
|
||||
}
|
||||
|
||||
/**
|
||||
* @see java.util.Map#get(java.lang.Object)
|
||||
*/
|
||||
public Object get(Object key)
|
||||
{
|
||||
return getProperties().get(key);
|
||||
}
|
||||
|
||||
/**
|
||||
* @see java.util.Map#isEmpty()
|
||||
*/
|
||||
public boolean isEmpty()
|
||||
{
|
||||
return getProperties().isEmpty();
|
||||
}
|
||||
|
||||
/**
|
||||
* @see java.util.Map#keySet()
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
public Set keySet()
|
||||
{
|
||||
return getProperties().keySet();
|
||||
}
|
||||
|
||||
/**
|
||||
* @see java.util.Map#put(K, V)
|
||||
*/
|
||||
public Object put(String key, Object value)
|
||||
{
|
||||
return getProperties().put(key, value);
|
||||
}
|
||||
|
||||
/**
|
||||
* @see java.util.Map#putAll(java.util.Map)
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
public void putAll(Map t)
|
||||
{
|
||||
getProperties().putAll(t);
|
||||
}
|
||||
|
||||
/**
|
||||
* @see java.util.Map#remove(java.lang.Object)
|
||||
*/
|
||||
public Object remove(Object key)
|
||||
{
|
||||
return getProperties().remove(key);
|
||||
}
|
||||
|
||||
/**
|
||||
* @see java.util.Map#size()
|
||||
*/
|
||||
public int size()
|
||||
{
|
||||
return getProperties().size();
|
||||
}
|
||||
|
||||
/**
|
||||
* @see java.util.Map#values()
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
public Collection values()
|
||||
{
|
||||
return getProperties().values();
|
||||
}
|
||||
}
|
@@ -20,6 +20,7 @@ import org.alfresco.util.GUID;
|
||||
* This type of node is typically used to drive the property sheet when data collection
|
||||
* is required for a type but the node does not need to be stored in the repository. An
|
||||
* example use is the workflow, transient nodes are used to collect workitem metadata.
|
||||
* </p>
|
||||
*
|
||||
* @author gavinc
|
||||
*/
|
||||
@@ -33,6 +34,7 @@ public class TransientNode extends Node
|
||||
* NOTE: The name is NOT automatically added to the map of properties,
|
||||
* if you need the name of this node to be in the map then add it to
|
||||
* the map passed in to this constructor.
|
||||
* </p>
|
||||
*
|
||||
* @param type The type this node will represent
|
||||
* @param name The name of the node
|
||||
|
Reference in New Issue
Block a user