This repository has been archived by the owner on Mar 27, 2024. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Started implementing Task tests, Task, and associated classes.
Also put a note in PersonSpec about documentation and enumerations. Signed-off-by: Jay Jay Billings <billingsjj@ornl.gov>
- Loading branch information
Jay Jay Billings
committed
Aug 3, 2020
1 parent
02d4b14
commit cb7ee4f
Showing
11 changed files
with
463 additions
and
23 deletions.
There are no files selected for viewing
24 changes: 24 additions & 0 deletions
24
org.eclipse.ice.renderer/src/main/java/org/eclipse/ice/renderer/PersonEnum.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
/******************************************************************************* | ||
* Copyright (c) 2020- UT-Battelle, LLC. | ||
* 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: | ||
* Initial API and implementation and/or initial documentation - | ||
* Jay Jay Billings | ||
*******************************************************************************/ | ||
package org.eclipse.ice.renderer; | ||
|
||
/** | ||
* | ||
* @author Jay Jay Billings | ||
* | ||
*/ | ||
public enum PersonEnum { | ||
|
||
TALL, | ||
|
||
SHORT | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
83 changes: 83 additions & 0 deletions
83
org.eclipse.ice.tasks/src/main/java/org/eclipse/ice/tasks/Task.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
/****************************************************************************** | ||
* Copyright (c) 2020- UT-Battelle, LLC. | ||
* 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: | ||
* Initial API and implementation and/or initial documentation - | ||
* Jay Jay Billings | ||
*****************************************************************************/ | ||
package org.eclipse.ice.tasks; | ||
|
||
import org.eclipse.ice.data.IDataElement; | ||
|
||
/** | ||
* The basic implementation of ITask. | ||
* | ||
* @author Jay Jay Billings | ||
* | ||
*/ | ||
public class Task<T extends IDataElement<T>> implements ITask<T> { | ||
|
||
/** | ||
* Constructor | ||
* | ||
* @param stateData the task state data must be provided on initialization | ||
* because tasks do not manage any data. See | ||
* {@link org.eclipse.ice.tasks.ITask}. | ||
*/ | ||
public Task(TaskStateData stateData) { | ||
|
||
} | ||
|
||
@Override | ||
public void setActionData(T actionData) { | ||
// TODO Auto-generated method stub | ||
|
||
} | ||
|
||
@Override | ||
public T getActionData() { | ||
// TODO Auto-generated method stub | ||
return null; | ||
} | ||
|
||
@Override | ||
public void setAction(Action<T> taskAction) { | ||
// TODO Auto-generated method stub | ||
|
||
} | ||
|
||
@Override | ||
public void addHook(Hook<T> hook) { | ||
// TODO Auto-generated method stub | ||
|
||
} | ||
|
||
@Override | ||
public TaskState execute() { | ||
// TODO Auto-generated method stub | ||
return null; | ||
} | ||
|
||
@Override | ||
public TaskState cancel() { | ||
// TODO Auto-generated method stub | ||
return null; | ||
} | ||
|
||
@Override | ||
public TaskState getState() { | ||
// TODO Auto-generated method stub | ||
return null; | ||
} | ||
|
||
@Override | ||
public TaskStateData getTaskStateData() { | ||
// TODO Auto-generated method stub | ||
return null; | ||
} | ||
|
||
} |
40 changes: 40 additions & 0 deletions
40
org.eclipse.ice.tasks/src/main/java/org/eclipse/ice/tasks/TaskStateDataSpec.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
/****************************************************************************** | ||
* Copyright (c) 2020- UT-Battelle, LLC. | ||
* 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: | ||
* Initial API and implementation and/or initial documentation - | ||
* Jay Jay Billings | ||
*****************************************************************************/ | ||
package org.eclipse.ice.tasks; | ||
|
||
import org.eclipse.ice.dev.annotations.DataElement; | ||
import org.eclipse.ice.dev.annotations.DataField; | ||
|
||
/** | ||
* The task state data spec that defines the state data for tasks. Note that | ||
* the actual TaskStateData class is autogenerated from this specification. | ||
* | ||
* Further note that this spec does not define any type of persistence for the | ||
* task state data. That is consistent with requirement from ITask that tasks | ||
* store state in memory by default if no otherwise configured state data is | ||
* provided. This is properly handled by creating a Data Model with an | ||
* @Persisted annotation on its TaskStateData. | ||
* | ||
* @author Jay Jay Billings | ||
* | ||
*/ | ||
@DataElement(name="TaskStateData") | ||
public class TaskStateDataSpec { | ||
|
||
/** | ||
* The state of the task | ||
*/ | ||
@DataField.Default(value = "org.eclipse.ice.tasks.TaskState.INITIALIZED") | ||
@DataField | ||
private TaskState taskState; | ||
|
||
} |
Oops, something went wrong.