DefaultProjectsRoleProvider.java
1.73 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
/*
* Decompiled with CFR 0_118.
*
* Could not load the following classes:
* com.adobe.cq.projects.api.ProjectMemberRole
* com.day.cq.wcm.api.Template
* org.apache.felix.scr.annotations.Component
* org.apache.felix.scr.annotations.Property
* org.apache.felix.scr.annotations.Service
*/
package com.adobe.cq.projects.impl.team;
import com.adobe.cq.projects.api.ProjectMemberRole;
import com.adobe.cq.projects.impl.team.ReadOnlyRole;
import com.adobe.cq.projects.impl.team.RoleClass;
import com.adobe.cq.projects.impl.team.RoleProvider;
import com.day.cq.wcm.api.Template;
import java.util.Collections;
import java.util.HashSet;
import java.util.Set;
import org.apache.felix.scr.annotations.Component;
import org.apache.felix.scr.annotations.Property;
import org.apache.felix.scr.annotations.Service;
@Component(immediate=1)
@Service(value={RoleProvider.class})
@Property(name="service.ranking", intValue={Integer.MAX_VALUE}, propertyPrivate=1)
public class DefaultProjectsRoleProvider
implements RoleProvider {
static final String ROLE_ID_OBSERVER = "observer";
static final String ROLE_ID_EDITOR = "editor";
static final String ROLE_ID_OWNER = "owner";
public static final ProjectMemberRole ROLE_VIEWER = new ReadOnlyRole("observer", "Observers", RoleClass.observer);
public static final ProjectMemberRole ROLE_OWNER = new ReadOnlyRole("owner", "Owners", RoleClass.owner);
public static final ProjectMemberRole ROLE_EDITOR = new ReadOnlyRole("editor", "Editors", RoleClass.editor);
private static final Set<ProjectMemberRole> DEFAULT_ROLES = Collections.unmodifiableSet(new HashSet<ProjectMemberRole>(){});
@Override
public Set<ProjectMemberRole> getRoles(Template template) {
return DEFAULT_ROLES;
}
}