| author | Shawn F. Cook | 2011-10-07 10:18:33 (EDT) |
|---|---|---|
| committer | Roberto E. Escobar | 2011-10-07 10:18:33 (EDT) |
| commit | da965d59561ae0741679f75e4a002e5fa52a7e0c (patch) (side-by-side diff) | |
| tree | 5a506b59432ab96acb078fe93eb4279dc029e3f0 | |
| parent | 1a9eac16e3521efc237e47047336acbfa336f5a7 (diff) | |
| download | org.eclipse.osee-da965d59561ae0741679f75e4a002e5fa52a7e0c.zip org.eclipse.osee-da965d59561ae0741679f75e4a002e5fa52a7e0c.tar.gz org.eclipse.osee-da965d59561ae0741679f75e4a002e5fa52a7e0c.tar.bz2 | |
feature[ats_Q9NLC]: Remove dependency WebArtifact->WebId
6 files changed, 26 insertions, 37 deletions
diff --git a/plugins/org.eclipse.osee.ats.view.web/src/org/eclipse/osee/ats/view/web/AtsWebSearchPresenter_TestBackend.java b/plugins/org.eclipse.osee.ats.view.web/src/org/eclipse/osee/ats/view/web/AtsWebSearchPresenter_TestBackend.java index 44b064d..b05c917 100644 --- a/plugins/org.eclipse.osee.ats.view.web/src/org/eclipse/osee/ats/view/web/AtsWebSearchPresenter_TestBackend.java +++ b/plugins/org.eclipse.osee.ats.view.web/src/org/eclipse/osee/ats/view/web/AtsWebSearchPresenter_TestBackend.java @@ -53,17 +53,15 @@ public class AtsWebSearchPresenter_TestBackend implements AtsSearchPresenter { WebId program2 = new WebId("taiwan_guid", "Taiwan"); WebArtifact defaultroot = new WebArtifact("defaultHierarchRoot_GUID", "Default Hierarchy Root", "Root Artifact"); - WebArtifact swreqs = new WebArtifact("SWReq_GUID", "Software Requirements", "Folder", - Arrays.asList(defaultroot.getWebId()), new WebId("branch_id1", "branch_id1")); - WebArtifact crewIntreqs = new WebArtifact("CrewInt_GUID", "Crew Interface", "Folder", Arrays.asList( - swreqs.getWebId(), defaultroot.getWebId()), new WebId("branch_id2", "branch_id2")); + WebArtifact swreqs = new WebArtifact("SWReq_GUID", "Software Requirements", "Folder", Arrays.asList(defaultroot), + new WebId("branch_id1", "branch_id1")); + WebArtifact crewIntreqs = new WebArtifact("CrewInt_GUID", "Crew Interface", "Folder", Arrays.asList(swreqs, + defaultroot), new WebId("branch_id2", "branch_id2")); WebArtifact commSubSysCrewIntreqs = new WebArtifact("commSubSysCrewInt_GUID", - "Communication Subsystem Crew Interface", "Heading", Arrays.asList(crewIntreqs.getWebId(), swreqs.getWebId(), - defaultroot.getWebId()), new WebId("branch_id3", "branch_id3")); - WebArtifact comm_page_Intreqs = - new WebArtifact("com_page_GUID", "{COM_PAGE}", "Software Requirement", Arrays.asList( - commSubSysCrewIntreqs.getWebId(), crewIntreqs.getWebId(), swreqs.getWebId(), defaultroot.getWebId()), - new WebId("branch_id4", "branch_id4")); + "Communication Subsystem Crew Interface", "Heading", Arrays.asList(crewIntreqs, swreqs, defaultroot), new WebId( + "branch_id3", "branch_id3")); + WebArtifact comm_page_Intreqs = new WebArtifact("com_page_GUID", "{COM_PAGE}", "Software Requirement", + Arrays.asList(commSubSysCrewIntreqs, crewIntreqs, swreqs, defaultroot), new WebId("branch_id4", "branch_id4")); private final Map<WebId, Collection<WebId>> programsAndBuilds = new HashMap<WebId, Collection<WebId>>(); private final Map<String, WebArtifact> artifacts = new HashMap<String, WebArtifact>(); diff --git a/plugins/org.eclipse.osee.display.api/src/org/eclipse/osee/display/api/data/WebArtifact.java b/plugins/org.eclipse.osee.display.api/src/org/eclipse/osee/display/api/data/WebArtifact.java index 96e5339..80e224c 100644 --- a/plugins/org.eclipse.osee.display.api/src/org/eclipse/osee/display/api/data/WebArtifact.java +++ b/plugins/org.eclipse.osee.display.api/src/org/eclipse/osee/display/api/data/WebArtifact.java @@ -30,9 +30,9 @@ public class WebArtifact { private final WebId branch; //ancestry should include all parental Artifacts starting with parent(index 0), grandparent(index 1), great-grandparent(index 2), etc. - private final Collection<WebId> ancestry = new ArrayList<WebId>(); + private final Collection<WebArtifact> ancestry = new ArrayList<WebArtifact>(); - public WebArtifact(String guid, String artifactName, String artifactType, Collection<WebId> ancestry, WebId branch) { + public WebArtifact(String guid, String artifactName, String artifactType, Collection<WebArtifact> ancestry, WebId branch) { this.guid = guid; this.artifactName = artifactName; this.artifactType = artifactType; @@ -43,7 +43,7 @@ public class WebArtifact { } public WebArtifact(String guid, String artifactName, String artifactType) { - this(guid, artifactName, artifactType, (Collection<WebId>) null, null); + this(guid, artifactName, artifactType, (Collection<WebArtifact>) null, null); } public String getArtifactName() { @@ -62,7 +62,7 @@ public class WebArtifact { return branch; } - public Collection<WebId> getAncestry() { + public Collection<WebArtifact> getAncestry() { return ancestry; } @@ -126,9 +126,4 @@ public class WebArtifact { public void setAttr_TechPerfParam(String attr_TechPerfParam) { this.attr_TechPerfParam = attr_TechPerfParam; } - - public WebId getWebId() { - WebId ret = new WebId(getGuid(), getArtifactName()); - return ret; - } } diff --git a/plugins/org.eclipse.osee.display.view.web/src/org/eclipse/osee/display/view/web/components/OseeArtifactNameLinkComponent.java b/plugins/org.eclipse.osee.display.view.web/src/org/eclipse/osee/display/view/web/components/OseeArtifactNameLinkComponent.java index 503c535..3c81dfb 100644 --- a/plugins/org.eclipse.osee.display.view.web/src/org/eclipse/osee/display/view/web/components/OseeArtifactNameLinkComponent.java +++ b/plugins/org.eclipse.osee.display.view.web/src/org/eclipse/osee/display/view/web/components/OseeArtifactNameLinkComponent.java @@ -13,7 +13,10 @@ package org.eclipse.osee.display.view.web.components; import java.util.HashMap; import java.util.Map; import org.eclipse.osee.display.api.data.WebArtifact; +import org.eclipse.osee.display.api.search.SearchNavigator; +import org.eclipse.osee.display.api.search.SearchPresenter; import org.eclipse.osee.display.view.web.CssConstants; +import org.eclipse.osee.display.view.web.OseeAppData; import org.eclipse.osee.display.view.web.internal.search.OseeRoadMapAndNavigation; import com.vaadin.terminal.ExternalResource; import com.vaadin.terminal.Resource; @@ -25,24 +28,19 @@ import com.vaadin.ui.Link; @SuppressWarnings("serial") public class OseeArtifactNameLinkComponent extends Link { + private final SearchPresenter searchPresenter = OseeAppData.getSearchPresenter(); + private final SearchNavigator navigator = OseeAppData.getNavigator(); + public OseeArtifactNameLinkComponent(WebArtifact artifact) { this(artifact, CssConstants.OSEE_SEARCHRESULT_ARTNAME); } - public OseeArtifactNameLinkComponent(WebArtifact artifact, String styleName) { - this(artifact.getArtifactName(), artifact.getGuid(), styleName); - } - - public OseeArtifactNameLinkComponent(String artName, String artGuid) { - this(artName, artGuid, CssConstants.OSEE_SEARCHRESULT_ARTNAME); - } - - public OseeArtifactNameLinkComponent(String artName, String artGuid, String styleName) { + public OseeArtifactNameLinkComponent(final WebArtifact artifact, String styleName) { super(); - this.setCaption(artName); + this.setCaption(artifact.getArtifactName()); Map<String, String> parameterMap = new HashMap<String, String>(); - parameterMap.put(OseeRoadMapAndNavigation.ARTIFACT, artGuid); + parameterMap.put(OseeRoadMapAndNavigation.ARTIFACT, artifact.getGuid()); String paramString = OseeRoadMapAndNavigation.parameterMapToRequestString(parameterMap); Resource artifactLink = new ExternalResource(String.format("ats#AtsArtifactView%s", paramString)); this.setResource(artifactLink); diff --git a/plugins/org.eclipse.osee.display.view.web/src/org/eclipse/osee/display/view/web/components/OseeBreadcrumbComponent.java b/plugins/org.eclipse.osee.display.view.web/src/org/eclipse/osee/display/view/web/components/OseeBreadcrumbComponent.java index f5917a8..74d0b97 100644 --- a/plugins/org.eclipse.osee.display.view.web/src/org/eclipse/osee/display/view/web/components/OseeBreadcrumbComponent.java +++ b/plugins/org.eclipse.osee.display.view.web/src/org/eclipse/osee/display/view/web/components/OseeBreadcrumbComponent.java @@ -12,7 +12,6 @@ package org.eclipse.osee.display.view.web.components; import java.util.Collection; import org.eclipse.osee.display.api.data.WebArtifact; -import org.eclipse.osee.display.api.data.WebId; import org.eclipse.osee.display.view.web.CssConstants; import com.vaadin.ui.HorizontalLayout; import com.vaadin.ui.Label; @@ -28,14 +27,13 @@ public class OseeBreadcrumbComponent extends HorizontalLayout { this.removeAllComponents(); if (artifact != null && artifact.getAncestry() != null) { - Collection<WebId> ancestryList = artifact.getAncestry(); + Collection<WebArtifact> ancestryList = artifact.getAncestry(); if (ancestryList.size() > 0) { Object[] ancestryArray = ancestryList.toArray(); for (int i = ancestryArray.length - 1; i >= 0; i--) { - WebId ancestor = (WebId) ancestryArray[i]; + WebArtifact ancestor = (WebArtifact) ancestryArray[i]; OseeArtifactNameLinkComponent crumbLabel = - new OseeArtifactNameLinkComponent(ancestor.getName(), ancestor.getGuid(), - CssConstants.OSEE_BREADCRUMB_ARTNAME); + new OseeArtifactNameLinkComponent(ancestor, CssConstants.OSEE_BREADCRUMB_ARTNAME); addComponent(crumbLabel); if (i > 0) { Label delimiter = new Label(" >> ", Label.CONTENT_XHTML); diff --git a/plugins/org.eclipse.osee.display.view.web/src/org/eclipse/osee/display/view/web/components/OseeSearchResultsListComponent.java b/plugins/org.eclipse.osee.display.view.web/src/org/eclipse/osee/display/view/web/components/OseeSearchResultsListComponent.java index 2bb05ca..8a1d3e1 100644 --- a/plugins/org.eclipse.osee.display.view.web/src/org/eclipse/osee/display/view/web/components/OseeSearchResultsListComponent.java +++ b/plugins/org.eclipse.osee.display.view.web/src/org/eclipse/osee/display/view/web/components/OseeSearchResultsListComponent.java @@ -73,7 +73,7 @@ public class OseeSearchResultsListComponent extends VerticalLayout implements Se int manySearchResultComponents = getManySearchResultComponents(); manySearchResultsHorizLayout.removeAllComponents(); - Label manySearchResults = new Label(String.format("[%d]", manySearchResultComponents)); + Label manySearchResults = new Label(String.format("[%d] ", manySearchResultComponents)); Label manySearchResults_suffix = new Label("search result(s) found."); manySearchResultsHorizLayout.addComponent(manySearchResults); manySearchResultsHorizLayout.addComponent(manySearchResults_suffix); diff --git a/plugins/org.eclipse.osee.support.config/launchConfig/UI.launch b/plugins/org.eclipse.osee.support.config/launchConfig/UI.launch index 2a93a42..596eab7 100644 --- a/plugins/org.eclipse.osee.support.config/launchConfig/UI.launch +++ b/plugins/org.eclipse.osee.support.config/launchConfig/UI.launch @@ -20,7 +20,7 @@ <stringAttribute key="pde.version" value="3.3"/> <booleanAttribute key="show_selected_only" value="false"/> <stringAttribute key="target_bundles" value="ch.qos.logback.classic@default:default,ch.qos.logback.core@default:default,ch.qos.logback.slf4j@default:false,com.ibm.icu@default:default,javax.servlet@default:default,javax.xml@default:default,org.apache.commons.codec@default:default,org.apache.commons.httpclient@default:default,org.apache.commons.lang@default:default,org.apache.commons.logging@default:default,org.apache.xerces@default:default,org.apache.xml.resolver@default:default,org.apache.xml.serializer@default:default,org.eclipse.ant.core@default:default,org.eclipse.core.commands@default:default,org.eclipse.core.contenttype@default:default,org.eclipse.core.databinding.observable@default:default,org.eclipse.core.databinding.property@default:default,org.eclipse.core.databinding@default:default,org.eclipse.core.expressions@default:default,org.eclipse.core.filesystem.win32.x86@default:false,org.eclipse.core.filesystem@default:default,org.eclipse.core.jobs@default:default,org.eclipse.core.net.win32.x86@default:false,org.eclipse.core.net@default:default,org.eclipse.core.resources.win32.x86@default:false,org.eclipse.core.resources@default:default,org.eclipse.core.runtime.compatibility.registry@default:false,org.eclipse.core.runtime@default:true,org.eclipse.core.variables@default:default,org.eclipse.equinox.app@default:default,org.eclipse.equinox.common@2:true,org.eclipse.equinox.ds@1:true,org.eclipse.equinox.event@default:default,org.eclipse.equinox.http.jetty@default:default,org.eclipse.equinox.http.servlet@default:default,org.eclipse.equinox.preferences@default:default,org.eclipse.equinox.registry@default:default,org.eclipse.equinox.security.win32.x86@default:false,org.eclipse.equinox.security@default:default,org.eclipse.equinox.servletbridge.extensionbundle@default:false,org.eclipse.equinox.transforms.hook@default:false,org.eclipse.equinox.util@default:default,org.eclipse.equinox.weaving.hook@default:false,org.eclipse.osgi.services@default:default,org.eclipse.osgi.util@default:default,org.eclipse.osgi@-1:true,org.hamcrest.core@default:default,org.junit*4.8.2.v4_8_2_v20110321-1705@default:default,org.mortbay.jetty.server@default:default,org.mortbay.jetty.util@default:default,org.objectweb.asm@default:default,org.slf4j.api@default:default,org.slf4j.jcl@default:default"/> -<stringAttribute key="timestamp" value="1317992980396"/> +<stringAttribute key="timestamp" value="1317997004206"/> <booleanAttribute key="tracing" value="false"/> <booleanAttribute key="useCustomFeatures" value="false"/> <booleanAttribute key="useDefaultConfigArea" value="true"/> |

