Skip to content

Package: Groupable

Groupable

Coverage

1: /*******************************************************************************
2: * Copyright (c) 2016, 2022 Eurotech and/or its affiliates and others
3: *
4: * This program and the accompanying materials are made
5: * available under the terms of the Eclipse Public License 2.0
6: * which is available at https://www.eclipse.org/legal/epl-2.0/
7: *
8: * SPDX-License-Identifier: EPL-2.0
9: *
10: * Contributors:
11: * Eurotech - initial API and implementation
12: *******************************************************************************/
13: package org.eclipse.kapua.service.authorization.group;
14:
15: import org.eclipse.kapua.model.id.KapuaId;
16: import org.eclipse.kapua.model.id.KapuaIdAdapter;
17:
18: import javax.xml.bind.annotation.XmlElement;
19: import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
20:
21: /**
22: * Interface used to mark group-able entities.
23: */
24: public interface Groupable {
25:
26: /**
27: * Sets the {@link Group} id of this entity.
28: *
29: * @param groupId The {@link Group} id to assign.
30: * @since 1.0.0
31: */
32: void setGroupId(KapuaId groupId);
33:
34: /**
35: * Gets the {@link Group} id assigned to this entity.
36: *
37: * @return The {@link Group} id assigned to this entity.
38: * @since 1.0.0
39: */
40: @XmlElement(name = "groupId")
41: @XmlJavaTypeAdapter(KapuaIdAdapter.class)
42: KapuaId getGroupId();
43:
44: }