blob: b32e89353f6711546651da041a793d4a46b29f13 (
plain) (
blame)
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
45
46
47
48
49
|
/*******************************************************************************
* Copyright (c) 2014 Boeing.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Boeing - initial API and implementation
*******************************************************************************/
package org.eclipse.osee.orcs.account.admin.internal;
import org.eclipse.osee.account.admin.SubscriptionGroup;
import org.eclipse.osee.account.rest.model.SubscriptionGroupId;
import org.eclipse.osee.framework.core.enums.CoreAttributeTypes;
import org.eclipse.osee.framework.jdk.core.type.BaseIdentity;
import org.eclipse.osee.orcs.data.ArtifactReadable;
/**
* @author Roberto E. Escobar
*/
public class AccountSubscriptionGroupImpl extends BaseIdentity<String> implements SubscriptionGroup {
private static final String NOT_AVAILABLE = "N/A";
private final ArtifactReadable artifact;
private final SubscriptionGroupId id;
public AccountSubscriptionGroupImpl(ArtifactReadable artifact) {
super(artifact.getGuid());
this.artifact = artifact;
this.id = new SubscriptionGroupId(artifact.getUuid());
}
@Override
public SubscriptionGroupId getId() {
return id;
}
@Override
public String getName() {
return artifact.getSoleAttributeValue(CoreAttributeTypes.Name, NOT_AVAILABLE);
}
@Override
public String toString() {
return "AccountSubscriptionGroupImpl [artifact=" + artifact + "]";
}
}
|