public DefaultOrg(Env env, String realm) throws OrganizationException {
this.realm = realm;
- supportedRealms=new HashSet<String>();
+ supportedRealms=new HashSet<>();
supportedRealms.add(realm);
domain=FQI.reverseDomain(realm);
atDomain = '@'+domain;
}
// Implement your own Delegation System
- static final List<String> NULL_DELEGATES = new ArrayList<String>();
+ static final List<String> NULL_DELEGATES = new ArrayList<>();
public Identities identities;
private boolean dryRun;
private final static Set<String> typeSet;
static {
- typeSet = new HashSet<String>();
+ typeSet = new HashSet<>();
for(Types t : Types.values()) {
typeSet.add(t.name());
}
public Response notify(AuthzTrans trans, Notify type, String url, String[] identities, String[] ccs, String summary, Boolean urgent) {
String system = trans.getProperty("CASS_ENV", "");
- ArrayList<String> toList = new ArrayList<String>();
+ ArrayList<String> toList = new ArrayList<>();
Identity identity;
if (identities != null) {
for (String user : identities) {
return Response.ERR_NotificationFailure;
}
- ArrayList<String> ccList = new ArrayList<String>();
+ ArrayList<String> ccList = new ArrayList<>();
// If we're sending an urgent email, CC the user's supervisor
//
int status = 1;
- List<String> to = new ArrayList<String>();
+ List<String> to = new ArrayList<>();
for(String em : toList) {
if(em.indexOf('@')<0) {
to.add(new DefaultOrgIdentity(trans, em, this).email());
}
}
- List<String> cc = new ArrayList<String>();
+ List<String> cc = new ArrayList<>();
if(ccList!=null) {
if(!ccList.isEmpty()) {
message.addHeader("X-Priority", "1");
}
- ArrayList<String> newBody = new ArrayList<String>();
+ ArrayList<String> newBody = new ArrayList<>();
Address temp[] = getAddresses(to);
String headerString = "TO:\t" + InternetAddress.toString(temp) + "\n";
@Override
public List<Identity> getApprovers(AuthzTrans trans, String user) throws OrganizationException {
Identity orgIdentity = getIdentity(trans, user);
- List<Identity> orgIdentitys = new ArrayList<Identity>();
+ List<Identity> orgIdentitys = new ArrayList<>();
if(orgIdentity!=null) {
Identity supervisor = orgIdentity.responsibleTo();
if(supervisor!=null) {