package de.innoaccel.wamp.server.message;

import java.util.List;

public class PublishMessage implements Message
{
    private String topicURI;

    private Object event;

    private boolean excludeMe;

    private List<String> exclude;

    private List<String> eligable;

    public PublishMessage(String topicURI, Object event)
    {
        this(topicURI, event, false);
    }

    public PublishMessage(String topicURI, Object event, boolean excludeMe)
    {
        this(topicURI, event, excludeMe, null, null);
    }

    public PublishMessage(String topicURI, Object event, List<String> exclude, List<String> eligable)
    {
        this(topicURI, event, false, exclude, eligable);
    }

    private PublishMessage(String topicURI, Object event, boolean excludeMe, List<String> exclude, List<String> eligable)
    {
        this.topicURI = topicURI;
        this.event = event;
        this.excludeMe = excludeMe;
        this.exclude = exclude;
        this.eligable = eligable;
    }

    @Override
    public int getMessageCode()
    {
        return Message.PUBLISH;
    }

    public String getTopicURI()
    {
        return this.topicURI;
    }

    public Object getEvent()
    {
        return event;
    }

    public boolean excludeMe()
    {
        return excludeMe;
    }

    public List<String> getExclude()
    {
        return exclude;
    }

    public List<String> getEligable()
    {
        return eligable;
    }

    public boolean isTargeted()
    {
        return (null != this.exclude || null != this.eligable);
    }
}

@@ -258,25 +258,25 @@
 String%3E elig
-a
+i
 ble;%0A%0A    pu
@@ -608,33 +608,33 @@
 ist%3CString%3E elig
-a
+i
 ble)%0A    %7B%0A     
@@ -674,25 +674,25 @@
 xclude, elig
-a
+i
 ble);%0A    %7D%0A
@@ -804,25 +804,25 @@
 String%3E elig
-a
+i
 ble)%0A    %7B%0A 
@@ -967,17 +967,17 @@
 his.elig
-a
+i
 ble = el
@@ -974,25 +974,25 @@
 gible = elig
-a
+i
 ble;%0A    %7D%0A%0A
@@ -1396,17 +1396,17 @@
  getElig
-a
+i
 ble()%0A  
@@ -1428,17 +1428,17 @@
 urn elig
-a
+i
 ble;%0A   
@@ -1536,17 +1536,17 @@
 his.elig
-a
+i
 ble);%0A  

Fix typo eligible