blob: ce83190ebc8915153fb17ae7f13b1fa97f413117 (
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
50
51
52
53
54
55
56
57
58
59
60
61
|
/*******************************************************************************
* Copyright (c) 2014 Wind River Systems, Inc. and others. 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:
* Wind River Systems - initial API and implementation
*******************************************************************************/
package org.eclipse.tcf.te.tcf.processes.core.persistence;
import java.util.List;
import org.eclipse.tcf.te.runtime.properties.PropertiesContainer;
import org.eclipse.tcf.te.tcf.processes.core.interfaces.IProcessContextItem;
/**
* ProcessContextItem
*/
public class ProcessContextItem extends PropertiesContainer implements IProcessContextItem {
/**
* Constructor.
*/
public ProcessContextItem() {
super();
}
/* (non-Javadoc)
* @see org.eclipse.tcf.te.tcf.processes.core.interfaces.IProcessContextItem#getId()
*/
@Override
public String getId() {
return getStringProperty(PROPERTY_ID);
}
/* (non-Javadoc)
* @see org.eclipse.tcf.te.tcf.processes.core.interfaces.IProcessContextItem#getName()
*/
@Override
public String getName() {
return getStringProperty(PROPERTY_NAME);
}
/* (non-Javadoc)
* @see org.eclipse.tcf.te.tcf.processes.core.interfaces.IProcessContextItem#getPath()
*/
@Override
public String[] getPath() {
Object path = getProperty(PROPERTY_PATH);
if (path instanceof String[]) {
return (String[])path;
}
if (path instanceof List<?>) {
return ((List<?>)path).toArray(new String[((List<?>)path).size()]);
}
return null;
}
}
|