public Object update( String service, String id, NexusResponse nexusResponse ) throws NexusConnectionException { return this.sendMessage( Method.PUT, this.buildUrl( service, id ), nexusResponse ); }
public Object getList( String service ) throws NexusClientException, NexusConnectionException { String url = this.buildUrl( service, "" ); return this.sendMessage( Method.GET, url, (NexusResponse) null ); }
public Object create( String service, String id, NexusResponse nexusResponse ) throws NexusConnectionException { return this.sendMessage( Method.POST, this.buildUrl( service, null ), nexusResponse ); // FIXME: The repositories service doesn't return anything for create, see NEXUS-540 }
public Object sendMessage( Method method, String url, NexusResponse nexusResponse ) throws NexusConnectionException { XStreamRepresentation representation = new XStreamRepresentation( this.xstream, "", MediaType.APPLICATION_XML ); // now set the payload representation.setPayload( nexusResponse ); return this.sendMessage( method, url, representation ); }
public Object sendCommand( String service, String command ) throws NexusConnectionException { return this.sendMessage( Method.PUT, this.buildUrl( service, "command" ), new StringRepresentation( command, MediaType.TEXT_ALL ) ); }
public Object get( String service, Map<String, String> args ) throws NexusClientException, NexusConnectionException { String url; try { url = this.buildUrl( service, null ) + this.buildParamString( args ); } catch ( UnsupportedEncodingException e ) { throw new NexusClientException( e.getMessage(), e ); } return this.sendMessage( Method.GET, url, (NexusResponse) null ); }