Project

General

Profile

« Previous | Next » 

Revision 58704

CommunityUtils:
chnage methods from static, add it with autowired in EmailSender
update properties

View differences:

CommunityUtils.java
34 34
        this.managers = managers;
35 35
    }
36 36

  
37
    public static CommunityUtils getCommunityInfo(String community) {
37
    public  CommunityUtils getCommunityInfo(String community) {
38 38
        String url = communityAPI + community;
39 39
        URL obj = null;
40 40
        String responseStr = null;
......
61 61
        }
62 62
        return json2CommunityInfo(responseStr);
63 63
    }
64
    private static CommunityUtils json2CommunityInfo(String json){
64
    private CommunityUtils json2CommunityInfo(String json){
65 65

  
66 66
        log.debug("Try to create CommunityInfo class from json: "+json);
67 67
        if (json == null){
......
85 85

  
86 86
        return communityInfo;
87 87
    }
88
    public Boolean isCommunityManager(String communityId, String userMail){
89
        CommunityUtils community = this.getCommunityInfo(communityId);
90
        return (community!=null && community.managers.indexOf(userMail) !=-1);
91
    }
88 92
}

Also available in: Unified diff