Tabnine Logo
RepositoryResourceResponse.getData
Code IndexAdd Tabnine to your IDE (free)

How to use
getData
method
in
org.sonatype.nexus.rest.model.RepositoryResourceResponse

Best Java code snippets using org.sonatype.nexus.rest.model.RepositoryResourceResponse.getData (Showing top 20 results out of 315)

origin: org.sonatype.nexus/nexus-test-harness-launcher

private RepositoryResource getRepository(String repositoryName)
  throws IOException
{
 String serviceURI = "service/local/repositories/" + repositoryName;
 String entityText = RequestFacade.doGetForText(serviceURI);
 RepositoryResourceResponse repository = (RepositoryResourceResponse) xstream.fromXML(entityText);
 return (RepositoryResource) repository.getData();
}
origin: org.sonatype.nexus/nexus-test-harness-base

private RepositoryResource getRepository( String repositoryName )
  throws IOException
{
  String serviceURI = "service/local/repositories/" + repositoryName;
  String responseText = RequestFacade.doGetRequest( serviceURI ).getEntity().getText();
  RepositoryResourceResponse repository = (RepositoryResourceResponse) xstream.fromXML( responseText );
  return (RepositoryResource) repository.getData();
}
origin: org.sonatype.nexus/nexus-rest-client-java

public RepositoryBaseResource getRepository( String id )
  throws NexusConnectionException, NexusClientException
{
  Object tempObj = this.getClientHelper().get( REPO_SERVICE, id );
  // type check the object so we can have a meaninful error if needed
  this.checkType( tempObj, RepositoryResourceResponse.class );
  RepositoryResourceResponse repoResponse = (RepositoryResourceResponse) tempObj;
  return repoResponse.getData();
}
origin: org.sonatype.nexus/nexus-test-harness-launcher

public RepositoryBaseResource getRepository(String repoId)
  throws IOException
{
 // accepted return codes: OK or redirect
 final String responseText = RequestFacade.doGetForText(SERVICE_PART + "/" + repoId, not(inError()));
 LOG.debug("responseText: \n" + responseText);
 // this should use call to: getResourceFromResponse
 XStreamRepresentation representation =
   new XStreamRepresentation(XStreamFactory.getXmlXStream(), responseText, MediaType.APPLICATION_XML);
 RepositoryResourceResponse resourceResponse =
   (RepositoryResourceResponse) representation.getPayload(new RepositoryResourceResponse());
 return resourceResponse.getData();
}
origin: org.sonatype.nexus/nexus-test-harness-base

public RepositoryResource getResourceFromResponse( Response response )
  throws IOException
{
  String responseString = response.getEntity().getText();
  LOG.debug( " getResourceFromResponse: " + responseString );
  XStreamRepresentation representation = new XStreamRepresentation( xstream, responseString, mediaType );
  RepositoryResourceResponse resourceResponse = (RepositoryResourceResponse) representation
    .getPayload( new RepositoryResourceResponse() );
  return (RepositoryResource) resourceResponse.getData();
}
origin: org.sonatype.nexus/nexus-test-utils

public RepositoryBaseResource getRepository( String repoId )
  throws IOException
{
  // accepted return codes: OK or redirect
  final String responseText = nexusRestClient.doGetForText( SERVICE_PART + "/" + repoId, not( inError() ) );
  LOG.debug( "responseText: \n" + responseText );
  // this should use call to: getResourceFromResponse
  XStreamRepresentation representation =
    new XStreamRepresentation( XStreamFactory.getXmlXStream(), responseText, MediaType.APPLICATION_XML );
  RepositoryResourceResponse resourceResponse =
    (RepositoryResourceResponse) representation.getPayload( new RepositoryResourceResponse() );
  return resourceResponse.getData();
}
origin: org.sonatype.nexus/nexus-test-harness-launcher

public RepositoryBaseResource getRepository(final String repoId)
  throws IOException
{
 // accepted return codes: OK or redirect
 final String responseText = nexusRestClient.doGetForText(SERVICE_PART + "/" + repoId, not(inError()));
 LOG.debug("responseText: \n" + responseText);
 // this should use call to: getResourceFromResponse
 XStreamRepresentation representation =
   new XStreamRepresentation(XStreamFactory.getXmlXStream(), responseText, MediaType.APPLICATION_XML);
 RepositoryResourceResponse resourceResponse =
   (RepositoryResourceResponse) representation.getPayload(new RepositoryResourceResponse());
 return resourceResponse.getData();
}
origin: org.sonatype.nexus/nexus-test-harness-launcher

public RepositoryBaseResource getRepositoryBaseResourceFromResponse(Response response)
  throws IOException
{
 String responseString = response.getEntity().getText();
 LOG.debug(" getRepositoryBaseResourceFromResponse: " + responseString);
 XStreamRepresentation representation = new XStreamRepresentation(xstream, responseString, mediaType);
 RepositoryResourceResponse resourceResponse =
   (RepositoryResourceResponse) representation.getPayload(new RepositoryResourceResponse());
 return resourceResponse.getData();
}
origin: org.sonatype.nexus/nexus-test-utils

public RepositoryBaseResource getRepositoryBaseResourceFromResponse( Response response )
  throws IOException
{
  String responseString = response.getEntity().getText();
  LOG.debug( " getRepositoryBaseResourceFromResponse: " + responseString );
  XStreamRepresentation representation = new XStreamRepresentation( xstream, responseString, mediaType );
  RepositoryResourceResponse resourceResponse =
    (RepositoryResourceResponse) representation.getPayload( new RepositoryResourceResponse() );
  return resourceResponse.getData();
}
origin: org.sonatype.nexus/nexus-test-harness-launcher

 public RepositoryBaseResource getTemplate(String id)
   throws IOException
 {
  String responseText = RequestFacade.doGetForText("service/local/templates/repositories/" + id
    , not(inError()));

  LOG.debug("responseText: \n" + responseText);

  XStreamRepresentation representation = new XStreamRepresentation(
    XStreamFactory.getXmlXStream(),
    responseText,
    MediaType.APPLICATION_XML);

  RepositoryResourceResponse resourceResponse = (RepositoryResourceResponse) representation
    .getPayload(new RepositoryResourceResponse());

  return resourceResponse.getData();
 }
}
origin: org.sonatype.nexus/nexus-test-harness-base

public RepositoryBaseResource getRepository( String repoId )
  throws IOException
{
  String responseText = RequestFacade
    .doGetRequest( "service/local/repositories/" + repoId ).getEntity().getText();
  LOG.debug( "responseText: \n" + responseText );
  // this should use call to: getResourceFromResponse
  XStreamRepresentation representation = new XStreamRepresentation(
    XStreamFactory.getXmlXStream(),
    responseText,
    MediaType.APPLICATION_XML );
  RepositoryResourceResponse resourceResponse = (RepositoryResourceResponse) representation
    .getPayload( new RepositoryResourceResponse() );
  return (RepositoryBaseResource) resourceResponse.getData();
}
origin: org.sonatype.nexus/nexus-rest-client-java

public RepositoryBaseResource createRepository( RepositoryBaseResource repo )
  throws NexusConnectionException, NexusClientException
{
  RepositoryResourceResponse repoResponseRequest = new RepositoryResourceResponse();
  repoResponseRequest.setData( repo );
  Object tempObj = this.getClientHelper().create( REPO_SERVICE, null, repoResponseRequest );
  // Hack around NEXUS-540
  if ( tempObj == null )
  {
    return this.getRepository( repo.getId() );
  }
  // type check the object so we can have a meaninful error if needed
  this.checkType( tempObj, RepositoryResourceResponse.class );
  RepositoryResourceResponse repoResponse = (RepositoryResourceResponse) tempObj;
  return repoResponse.getData();
}
origin: org.sonatype.nexus/nexus-rest-client-java

public RepositoryBaseResource updateRepository( RepositoryBaseResource repo )
  throws NexusConnectionException, NexusClientException
{
  RepositoryResourceResponse repoResponseRequest = new RepositoryResourceResponse();
  repoResponseRequest.setData( repo );
  Object tempObj = this.getClientHelper().update( REPO_SERVICE, repo.getId(), repoResponseRequest );
  // Hack around NEXUS-540
  if ( tempObj == null )
  {
    return this.getRepository( repo.getId() );
  }
  // type check the object so we can have a meaninful error if needed
  this.checkType( tempObj, RepositoryResourceResponse.class );
  RepositoryResourceResponse repoResponse = (RepositoryResourceResponse) tempObj;
  return repoResponse.getData();
}
origin: org.sonatype.nexus.client/nexus-client-core

S doGet()
{
  try
  {
    return (S) getNexusClient()
      .serviceResource( uri() + "/" + id() )
      .get( RepositoryResourceResponse.class )
      .getData();
  }
  catch ( UniformInterfaceException e )
  {
    throw getNexusClient().convert( e );
  }
  catch ( ClientHandlerException e )
  {
    throw getNexusClient().convert( e );
  }
}
origin: org.sonatype.nexus.plugins/nexus-restlet1x-plugin

RepositoryBaseResource resource = repoRequest.getData();
repoId = resource.getId();
origin: org.sonatype.nexus.client/nexus-client-core

S doCreate()
{
  final RepositoryResourceResponse request = new RepositoryResourceResponse();
  request.setData( settings() );
  try
  {
    return (S) getNexusClient()
      .serviceResource( uri() )
      .post( RepositoryResourceResponse.class, request )
      .getData();
  }
  catch ( UniformInterfaceException e )
  {
    throw getNexusClient().convert( e );
  }
  catch ( ClientHandlerException e )
  {
    throw getNexusClient().convert( e );
  }
}
origin: org.sonatype.nexus/nexus-rest-api

RepositoryBaseResource resource = repoRequest.getData();
repoId = resource.getId();
origin: org.sonatype.nexus.client/nexus-client-core

S doUpdate()
{
  final RepositoryResourceResponse request = new RepositoryResourceResponse();
  request.setData( settings() );
  try
  {
    return (S) getNexusClient()
      .serviceResource( uri() + "/" + id() )
      .put( RepositoryResourceResponse.class, request )
      .getData();
  }
  catch ( UniformInterfaceException e )
  {
    throw getNexusClient().convert( e );
  }
  catch ( ClientHandlerException e )
  {
    throw getNexusClient().convert( e );
  }
}
origin: org.sonatype.nexus.client/nexus-client-core

    .serviceResource( "repositories/" + id )
    .get( RepositoryResourceResponse.class )
    .getData()
);
origin: org.sonatype.nexus.plugins/nexus-restlet1x-plugin

RepositoryBaseResource resource = repoRequest.getData();
org.sonatype.nexus.rest.modelRepositoryResourceResponsegetData

Javadoc

Get null

Popular methods of RepositoryResourceResponse

  • <init>
  • setData
    Set null

Popular in Java

  • Reading from database using SQL prepared statement
  • setContentView (Activity)
  • getExternalFilesDir (Context)
  • getSupportFragmentManager (FragmentActivity)
  • BufferedInputStream (java.io)
    A BufferedInputStream adds functionality to another input stream-namely, the ability to buffer the i
  • Thread (java.lang)
    A thread is a thread of execution in a program. The Java Virtual Machine allows an application to ha
  • Iterator (java.util)
    An iterator over a sequence of objects, such as a collection.If a collection has been changed since
  • ReentrantLock (java.util.concurrent.locks)
    A reentrant mutual exclusion Lock with the same basic behavior and semantics as the implicit monitor
  • Base64 (org.apache.commons.codec.binary)
    Provides Base64 encoding and decoding as defined by RFC 2045.This class implements section 6.8. Base
  • IOUtils (org.apache.commons.io)
    General IO stream manipulation utilities. This class provides static utility methods for input/outpu
  • Top Sublime Text plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now