package de.davherrmann.efficiently.server;

import java.util.Map;

import com.google.common.collect.ImmutableMap;

public class StandardAction implements Action<Map<String, String>>
{
    private String type;
    private Map<String, String> meta = ImmutableMap.of();

    public StandardAction()
    {
        this("");
    }

    public StandardAction(final String type)
    {
        this.type = type;
    }

    public String type()
    {
        return type;
    }

    // TODO allow typed Action? with immutable data? returning from asynchronous service call?
    public Map<String, String> meta()
    {
        return meta;
    }
}

@@ -387,20 +387,175 @@
 this
-.type = type
+(type, ImmutableMap.of());%0A    %7D%0A%0A    public StandardAction(final String type, final Map%3CString, String%3E meta)%0A    %7B%0A        this.type = type;%0A        this.meta = meta
 ;%0A  

add constructor for setting meta data