diff options
author | ddunne | 2009-03-18 19:22:46 +0000 |
---|---|---|
committer | ddunne | 2009-03-18 19:22:46 +0000 |
commit | 309f0f645099e48d579601bd843461ce053546e4 (patch) | |
tree | cb11829384a737316f63bff34bdad56ca51f3c56 | |
parent | 644524917aba2df23f6579d5cf32c8d399e87d2f (diff) | |
download | org.eclipse.osee-309f0f645099e48d579601bd843461ce053546e4.tar.gz org.eclipse.osee-309f0f645099e48d579601bd843461ce053546e4.tar.xz org.eclipse.osee-309f0f645099e48d579601bd843461ce053546e4.zip |
3 files changed, 78 insertions, 8 deletions
diff --git a/org.eclipse.osee.ats.config.demo/src/org/eclipse/osee/ats/config/demo/config/DemoDatabaseConfig.java b/org.eclipse.osee.ats.config.demo/src/org/eclipse/osee/ats/config/demo/config/DemoDatabaseConfig.java index 9d322ecad02..b11105cd487 100644 --- a/org.eclipse.osee.ats.config.demo/src/org/eclipse/osee/ats/config/demo/config/DemoDatabaseConfig.java +++ b/org.eclipse.osee.ats.config.demo/src/org/eclipse/osee/ats/config/demo/config/DemoDatabaseConfig.java @@ -18,6 +18,7 @@ import org.eclipse.osee.ats.artifact.TeamDefinitionArtifact; import org.eclipse.osee.ats.artifact.VersionArtifact; import org.eclipse.osee.ats.config.demo.OseeAtsConfigDemoPlugin; import org.eclipse.osee.ats.config.demo.util.DemoTeams; +import org.eclipse.osee.ats.config.demo.util.DemoUsers; import org.eclipse.osee.ats.config.demo.util.DemoTeams.Team; import org.eclipse.osee.ats.config.demo.workflow.DemoCodeWorkFlowDefinition; import org.eclipse.osee.ats.config.demo.workflow.DemoReqWorkFlowDefinition; @@ -34,6 +35,7 @@ import org.eclipse.osee.framework.skynet.core.artifact.ArtifactPersistenceManage import org.eclipse.osee.framework.skynet.core.artifact.ArtifactTypeManager; import org.eclipse.osee.framework.skynet.core.artifact.Branch; import org.eclipse.osee.framework.skynet.core.artifact.BranchManager; +import org.eclipse.osee.framework.skynet.core.artifact.search.ArtifactQuery; import org.eclipse.osee.framework.skynet.core.transaction.SkynetTransaction; import org.eclipse.osee.framework.skynet.core.utility.Requirements; import org.eclipse.osee.framework.ui.skynet.widgets.workflow.WorkItemDefinition.WriteType; @@ -72,6 +74,14 @@ public class DemoDatabaseConfig extends AtsDbConfig implements IDbInitialization SawBuilds.SAW_Bld_1.name(), transaction); mapTeamVersionToBranch(DemoTeams.getInstance().getTeamDef(Team.CIS_SW), CISBuilds.CIS_Bld_1.name(), CISBuilds.CIS_Bld_1.name(), transaction); + + // Set Joe Smith as Priviledged Member of SAW Test + Artifact teamDef = + ArtifactQuery.getArtifactFromTypeAndName(TeamDefinitionArtifact.ARTIFACT_NAME, "SAW Test", + AtsPlugin.getAtsBranch()); + teamDef.addRelation(AtsRelation.PrivilegedMember_Member, DemoUsers.getDemoUser(DemoUsers.Joe_Smith)); + teamDef.persistAttributesAndRelations(transaction); + transaction.execute(); OseeInfo.putValue(Requirements.OSEE_INFO_TEST_CASE_KEY, "Test Case"); diff --git a/org.eclipse.osee.ats.config.demo/src/org/eclipse/osee/ats/config/demo/util/DemoUsers.java b/org.eclipse.osee.ats.config.demo/src/org/eclipse/osee/ats/config/demo/util/DemoUsers.java index 2dcf37ccb43..a6cb0425de0 100644 --- a/org.eclipse.osee.ats.config.demo/src/org/eclipse/osee/ats/config/demo/util/DemoUsers.java +++ b/org.eclipse.osee.ats.config.demo/src/org/eclipse/osee/ats/config/demo/util/DemoUsers.java @@ -10,18 +10,79 @@ *******************************************************************************/
package org.eclipse.osee.ats.config.demo.util;
+import org.eclipse.osee.framework.core.data.IOseeUserInfo;
import org.eclipse.osee.framework.db.connection.exception.OseeCoreException;
import org.eclipse.osee.framework.skynet.core.User;
import org.eclipse.osee.framework.skynet.core.UserManager;
+/*******************************************************************************
+ * Copyright (c) 2004, 2007 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
+ *******************************************************************************/
+
/**
* @author Donald G. Dunne
*/
-public enum DemoUsers {
- Joe_Smith, Kay_Jones, Jason_Michael, Alex_Kay;
+public enum DemoUsers implements IOseeUserInfo {
+ Joe_Smith("Joe Smith", "", "Joe Smith", true),
+ Kay_Jones("Guest", "", "99999998", true),
+ Jason_Michael("Boot Strap", "bootstrap@osee.org", "bootstrap", true),
+ Alex_Kay("UnAssigned", "", "99999997", true);
+ private final String name;
+ private final String email;
+ private final String userID;
+ private final boolean active;
+
+ DemoUsers(String name, String email, String userId, boolean active) {
+ this.name = name;
+ this.email = email;
+ this.userID = userId;
+ this.active = active;
+ }
public static User getDemoUser(DemoUsers demoUser) throws OseeCoreException {
- return UserManager.getUserByName(demoUser.name().replaceAll("_", " "));
+ return UserManager.getUserByName(demoUser.name());
+ }
+
+ /**
+ * @return Returns the email.
+ */
+ public String getEmail() {
+ return email;
+ }
+
+ /**
+ * @return Returns the name.
+ */
+ public String getName() {
+ return name;
}
+ /**
+ * @return Returns the userID.
+ */
+ public String getUserID() {
+ return userID;
+ }
+
+ /**
+ * @return Returns the active.
+ */
+ public boolean isActive() {
+ return active;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.osee.framework.core.data.IOseeUserInfo#isCreationRequired()
+ */
+ @Override
+ public boolean isCreationRequired() {
+ return false;
+ }
}
diff --git a/org.eclipse.osee.ats.config.demo/support/OseeTypes_DemoProgram.xml b/org.eclipse.osee.ats.config.demo/support/OseeTypes_DemoProgram.xml index d3b5afc3544..48ac8026b85 100644 --- a/org.eclipse.osee.ats.config.demo/support/OseeTypes_DemoProgram.xml +++ b/org.eclipse.osee.ats.config.demo/support/OseeTypes_DemoProgram.xml @@ -298,7 +298,7 @@ </Row>
<Row ss:AutoFitHeight="0">
<Cell ss:StyleID="s23"><Data ss:Type="String">org.eclipse.osee.framework.skynet.core.artifact.factory.BasicArtifactFactory</Data></Cell>
- <Cell ss:StyleID="s24"><Data ss:Type="String">Test Script</Data></Cell>
+ <Cell ss:StyleID="s24"><Data ss:Type="String">Test Case</Data></Cell>
<Cell ss:StyleID="s26"><Data ss:Type="String">Artifact</Data></Cell>
</Row>
<Row ss:AutoFitHeight="0" ss:Height="13.5">
@@ -999,7 +999,7 @@ <Cell ss:StyleID="s38"/>
</Row>
<Row ss:AutoFitHeight="0" ss:Height="13.5">
- <Cell ss:StyleID="s24"><Data ss:Type="String">Test Script</Data><NamedCell
+ <Cell ss:StyleID="s24"><Data ss:Type="String">Test Case</Data><NamedCell
ss:Name="_FilterDatabase"/></Cell>
<Cell ss:StyleID="s25"><Data ss:Type="String">Qualification</Data><NamedCell
ss:Name="_FilterDatabase"/></Cell>
@@ -1557,12 +1557,11 @@ </Print>
<Zoom>75</Zoom>
<Selected/>
- <TopRowVisible>30</TopRowVisible>
+ <TopRowVisible>62</TopRowVisible>
<Panes>
<Pane>
<Number>3</Number>
- <ActiveRow>89</ActiveRow>
- <ActiveCol>6</ActiveCol>
+ <ActiveRow>106</ActiveRow>
</Pane>
</Panes>
<ProtectObjects>False</ProtectObjects>
|