summaryrefslogtreecommitdiffstats
path: root/src/main/java/com/gitblit/manager/NotificationManager.java
Commit message (Collapse)AuthorAgeFilesLines
* Annotate managers with @SingletonJames Moger2014-07-031-1/+3
|
* Use Guice annotations, not javax.inject annotationsJames Moger2014-07-031-1/+1
|
* Embrace @Inject for Managers, Servlets, and FiltersJames Moger2014-07-031-0/+2
|
* Add method to INotificationManager to return email service statusJames Moger2014-06-051-0/+5
|
* Fix missing subject in html mailingsJames Moger2014-03-211-0/+1
|
* Improve notification api by introducing the Mailing modelJames Moger2014-02-281-97/+26
|
* Support customizing the "from" display name for generated emailsJames Moger2013-12-301-3/+29
| | | | Change-Id: Ibad9e2b1c12a24ad9c671a0d96aafb3365daa529
* Moved servlets and services to separate packagesJames Moger2013-11-291-3/+3
| | | | Change-Id: I5f0f50f4ae7d332e9f724a2e6f074fa71f646035
* Extract Federation, Gitblit and Services manager from GitBlit singletonJames Moger2013-11-291-5/+6
| | | | Change-Id: I2b2f361a868c8eedf4b6df5939e7dfac2d5f92a9
* Extract NotificationManager from GitBlit singletonJames Moger2013-11-291-0/+181
Change-Id: I40335a1a3966d6c7c55bcdcca5a6dbf2a91a65d7
ld } /* Name.Tag */ .highlight .nv { color: #336699 } /* Name.Variable */ .highlight .ow { color: #008800 } /* Operator.Word */ .highlight .w { color: #bbbbbb } /* Text.Whitespace */ .highlight .mb { color: #0000DD; font-weight: bold } /* Literal.Number.Bin */ .highlight .mf { color: #0000DD; font-weight: bold } /* Literal.Number.Float */ .highlight .mh { color: #0000DD; font-weight: bold } /* Literal.Number.Hex */ .highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */ .highlight .mo { color: #0000DD; font-weight: bold } /* Literal.Number.Oct */ .highlight .sa { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Affix */ .highlight .sb { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Backtick */ .highlight .sc { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Char */ .highlight .dl { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Delimiter */ .highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */ .highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */ .highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */ .highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */ .highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
import org.aspectj.testing.Tester;
import java.util.*;


public class MethodSigs {
    public static void main(String[] args) {
        new MethodSigs().realMain(args);
    }

    String want;
    void want(String want) { this.want = want; }
    void w(String s) { want(s); }
    void have(Object have, Object msg) { Tester.checkEqual(want, have, msg+""); }
    void have(Object have) { Tester.checkEqual(want, have); }
    
    public void realMain(String[] args) {
        lists();
        integers();
    }
        
    void lists() {
        Object o     = new Object() { public String toString() { return "o"; } };
        Object o1    = new Object() { public String toString() { return "o"; } };
        Object o2    = new Object() { public String toString() { return "o"; } };
        List l = new Vector() { public String toString()  { return "l:"+super.toString(); } };
        List l1 = new Vector() { public String toString() { return "l1:"+super.toString(); } };
        List l2 = new Vector() { public String toString() { return "l2:"+super.toString(); } };
        Collection c = new Vector() { public String toString()  { return "c:"+super.toString(); } };
        Collection c1 = new Vector() { public String toString() { return "c1:"+super.toString(); } };
        Collection c2 = new Vector() { public String toString() { return "c2:"+super.toString(); } };
        Set s = new HashSet() { public String toString()  { return "s:"+super.toString(); } };
        Set s1 = new HashSet() { public String toString() { return "s1:"+super.toString(); } };
        Set s2 = new HashSet() { public String toString() { return "s2:"+super.toString(); } };

        want("a:Object,Object");         a(o1,o2);
        want("a:List,Object");           a(l,o);
        want("a:Object,List");           a(o,l);
        want("a:Collection,Object");     a(c,o);
        want("a:Object,Collection");     a(o,c);
        want("a:List,Collection");       a(l,c);
        want("a:Collection,List");       a(c,l);
        want("a:Collection,Collection"); a(c1,c2);
        want("a:Set,Collection");        a(s,c);
        want("a:Collection,Set");        a(c,s);
        want("a:Set,Set");               a(s1,s2);
        want("a:List,Set");              a(l,s);
        want("a:Set,List");              a(s,l);
    }

    public void a(Object o1, Object o2)         { have("a:Object,Object"); }
    public void a(List l, Object o)             { have("a:List,Object"); }
    public void a(Object o, List l)             { have("a:Object,List"); }
    public void a(Collection c, Object o)       { have("a:Collection,Object"); }
    public void a(Object o, Collection c)       { have("a:Object,Collection"); }
    public void a(List l, Collection c)         { have("a:List,Collection"); }
    public void a(Collection c,List  l)         { have("a:Collection,List"); }
    public void a(Collection c1, Collection c2) { have("a:Collection,Collection"); }
    public void a(Set s, Collection c)          { have("a:Set,Collection"); }
    public void a(Collection c,Set s)           { have("a:Collection,Set"); }
    public void a(Set s1, Set s2)               { have("a:Set,Set"); }
    public void a(List l, Set s)                { have("a:List,Set"); }
    public void a(Set s,List l)                 { have("a:Set,List"); }

    void integers() {
        Integer i   = new Integer(0);
        Integer i1   = new Integer(1);
        Integer i2   = new Integer(2);
        Object o     = new Object() { public String toString() { return "o"; } };
        Object o1    = new Object() { public String toString() { return "o"; } };
        Object o2    = new Object() { public String toString() { return "o"; } };
        Object oi    = new Integer(3);
        
        w("Object,Object");   f(o1,o2);
        w("Integer,Object");  f(i,o);
        w("Object,Integer");  f(o,i);
        w("Integer,Integer"); f(i1,i2);
        w("Object,Object");   f(oi,oi);
        w("Object,Object");   f(oi,o);
        w("Object,Object");   f(o,oi);
    }

    public void f(Object o1, Object o2)   { have("Object,Object",   o1+":"+o2);  }
    public void f(Integer i, Object o)    { have("Integer,Object",  i+":"+o);    }
    public void f(Object o, Integer i)    { have("Object,Integer",  o+":"+i);    }
    public void f(Integer i1, Integer i2) { have("Integer,Integer", i1+":"+i2);  }
}