com.memority.domino.shared.api.sync.ShadowKind Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of domino-api Show documentation
Show all versions of domino-api Show documentation
This artifact provides the API classes that are necessary to implement synchronization configuration Rules on the Memority IM platform.
/*
* Copyright (c) 2016-2023 Memority. All Rights Reserved.
*
* This file is part of Memority Domino API , a Memority project.
*
* This file is released under the Memority Public Artifacts End-User License Agreement,
* see
* Unauthorized copying of this file, via any medium is strictly prohibited.
*/
package com.memority.domino.shared.api.sync;
import com.memority.citadel.shared.api.im.ObjectKind;
import com.memority.domino.shared.api.XmlConstants;
import javax.xml.bind.annotation.XmlType;
import java.util.Arrays;
/**
* The possible Shadow kinds.
*
* @author Pierre Sion <[email protected]>
*/
@XmlType(name = XmlConstants.NAME_TYPE_SHADOWKIND)
public enum ShadowKind {
/**
* Represents a user account, mapped to an IdentityImage
*/
ACCOUNT(ObjectKind.IDENTITY),
ORGANIZATION(ObjectKind.ORGANIZATION),
RESOURCE(ObjectKind.RESOURCE),
ROLE(ObjectKind.ROLE),
ROLE_PUBLICATION(ObjectKind.ROLE_PUBLICATION),
/**
* Generic representation of an Application-side role, privilege, access right, group. Not mapped to an IDM object.
* Entitlements are associated with Shadows of type "account" (not with IDM objects!), e.g. an account can be added
* as a member of a group.
*/
ENTITLEMENT(null);
private final ObjectKind objectKind;
ShadowKind(ObjectKind objectKind) {
this.objectKind = objectKind;
}
public ObjectKind getObjectKind() {
return objectKind;
}
public static ShadowKind fromObjectKind(ObjectKind objectKind) {
return Arrays.stream(ShadowKind.values()).filter(o -> o.getObjectKind() == objectKind).findFirst().orElse(null);
}
}