588
|
1 |
/*
|
|
2 |
* Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies).
|
|
3 |
* All rights reserved.
|
|
4 |
* This component and the accompanying materials are made available
|
|
5 |
* under the terms of the License "Eclipse Public License v1.0"
|
|
6 |
* which accompanies this distribution, and is available
|
|
7 |
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
|
8 |
*
|
|
9 |
* Initial Contributors:
|
|
10 |
* Nokia Corporation - initial contribution.
|
|
11 |
*
|
|
12 |
* Contributors:
|
|
13 |
*
|
|
14 |
* Description:
|
|
15 |
*
|
|
16 |
*/
|
|
17 |
|
|
18 |
package com.nokia.helium.ccmtask.ant.types;
|
|
19 |
|
628
|
20 |
import java.util.Vector;
|
|
21 |
|
588
|
22 |
import org.apache.tools.ant.types.DataType;
|
|
23 |
|
|
24 |
/**
|
|
25 |
* This class implement an Ant Datatype that represents a set of
|
|
26 |
* synergy sessions.
|
|
27 |
* @ant.type name="sessionset" category="SCM"
|
|
28 |
*/
|
|
29 |
public class SessionSet extends DataType {
|
|
30 |
private Vector<Session> sessions = new Vector<Session>();
|
|
31 |
|
|
32 |
/**
|
|
33 |
* Create and register a Session object.
|
|
34 |
* @return a Session object.
|
|
35 |
*/
|
|
36 |
public Session createSession() {
|
|
37 |
Session session = new Session();
|
|
38 |
sessions.add(session);
|
|
39 |
return session;
|
|
40 |
}
|
|
41 |
|
|
42 |
/**
|
|
43 |
* Returns an array of Session object.
|
|
44 |
* @returns an array of Session object
|
|
45 |
*/
|
|
46 |
public Session[] getSessions() {
|
|
47 |
Session[] result = new Session[sessions.size()];
|
|
48 |
sessions.copyInto(result);
|
|
49 |
return result;
|
|
50 |
}
|
|
51 |
}
|
|
52 |
|