DefaultProjectsRoleProvider.java 1.73 KB
/*
 * 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;
    }

}