/** * Method removeData. * * @param nexusArtifact */ public void removeData( NexusArtifact nexusArtifact ) { getData().remove( nexusArtifact ); } //-- void removeData( NexusArtifact )
/** * Method addData. * * @param nexusArtifact */ public void addData( NexusArtifact nexusArtifact ) { getData().add( nexusArtifact ); } //-- void addData( NexusArtifact )
/** * Method addData. * * @param nexusArtifact */ public void addData( NexusArtifact nexusArtifact ) { getData().add( nexusArtifact ); } //-- void addData( NexusArtifact )
/** * Method removeData. * * @param nexusArtifact */ public void removeData( NexusArtifact nexusArtifact ) { getData().remove( nexusArtifact ); } //-- void removeData( NexusArtifact )
/** * Method removeData * * @param nexusArtifact */ public void removeData(NexusArtifact nexusArtifact) { if ( !(nexusArtifact instanceof NexusArtifact) ) { throw new ClassCastException( "SearchResponse.removeData(nexusArtifact) parameter must be instanceof " + NexusArtifact.class.getName() ); } getData().remove( nexusArtifact ); } //-- void removeData(NexusArtifact)
/** * Method addData * * @param nexusArtifact */ public void addData(NexusArtifact nexusArtifact) { if ( !(nexusArtifact instanceof NexusArtifact) ) { throw new ClassCastException( "SearchResponse.addData(nexusArtifact) parameter must be instanceof " + NexusArtifact.class.getName() ); } getData().add( nexusArtifact ); } //-- void addData(NexusArtifact)
/** * Uses XStream to unmarshall the DTOs. */ private List<NexusArtifact> doSearchFor(Map<String, String> queryArgs, String repositoryId, SearchType searchType, Matcher<Response>... matchers) throws IOException { String entityText = doSearchForR(queryArgs, repositoryId, searchType, matchers); XStreamRepresentation representation = new XStreamRepresentation(xstream, entityText, MediaType.APPLICATION_XML); return ((SearchResponse) representation.getPayload(new SearchResponse())).getData(); }
return ( (SearchResponse) tempObj ).getData();
@SuppressWarnings( "unchecked" ) public List<NexusArtifact> searchFor( Map<String, String> queryArgs ) throws Exception { String responseText = doSearchFor( queryArgs ).getEntity().getText(); XStreamRepresentation representation = new XStreamRepresentation( xstream, responseText, MediaType.APPLICATION_XML ); SearchResponse searchResponde = (SearchResponse) representation.getPayload( new SearchResponse() ); return searchResponde.getData(); }
@SuppressWarnings( "unchecked" ) public static List<NexusArtifact> searchClassname( String classname ) throws Exception { String responseText = doSearchForClassName( classname ).getEntity().getText(); XStreamRepresentation representation = new XStreamRepresentation( xstream, responseText, MediaType.APPLICATION_XML ); SearchResponse searchResponde = (SearchResponse) representation.getPayload( new SearchResponse() ); return searchResponde.getData(); }