Tabnine Logo
Link.href
Code IndexAdd Tabnine to your IDE (free)

How to use
href
method
in
org.apache.polygene.library.rest.common.link.Link

Best Java code snippets using org.apache.polygene.library.rest.common.link.Link.href (Showing top 9 results out of 315)

origin: apache/attic-polygene-java

public synchronized ContextResourceClient newClient( Link link )
{
  if( link == null )
  {
    throw new NullPointerException( "No link specified" );
  }
  return newClient( link.href().get() );
}
origin: apache/attic-polygene-java

HandlerCommand query( Link link, Object queryRequest, ResponseHandler handler, ResponseHandler processingErrorHandler )
{
  if (handler == null)
    handler = queryHandlers.get( link.rel().get() );
  if (handler == null)
    throw new IllegalArgumentException( "No handler set for relation "+link.rel().get() );
  if (processingErrorHandler == null)
    processingErrorHandler = processingErrorHandlers.get( link.rel().get() );
  Reference linkRef = new Reference(link.href().get());
  if (linkRef.isRelative())
    linkRef = new Reference( reference.toUri().toString() + link.href().get() );
  return invokeQuery( linkRef, queryRequest, handler, processingErrorHandler );
}
origin: apache/attic-polygene-java

HandlerCommand command( Link link, Object commandRequest, ResponseHandler handler, ResponseHandler processingErrorHandler )
{
  if (handler == null)
    handler = commandHandlers.get( link.rel().get() );
  if (processingErrorHandler == null)
    processingErrorHandler = processingErrorHandlers.get( link.rel().get() );
  // Check if we should do POST or PUT
  Method method;
  if( LinksUtil.withClass( "idempotent" ).test( link ) )
  {
    method = Method.PUT;
  }
  else
  {
    method = Method.POST;
  }
  Reference ref = new Reference( reference.toUri().toString() + link.href().get() );
  return invokeCommand( ref, method, commandRequest, handler, processingErrorHandler );
}
origin: apache/attic-polygene-java

public T addLink( String description, String id )
{
  try
  {
    linkBuilder.prototype().text().set( description );
    linkBuilder.prototype().id().set( id );
    if( command != null )
    {
      linkBuilder.prototype().href().set( command + "?entity=" + id );
    }
    else
    {
      linkBuilder.prototype()
        .href()
        .set( ( path == null ? "" : path + "/" ) + URLEncoder.encode( id, "UTF-8" ) + "/" );
    }
    linkBuilder.prototype().rel().set( rel );
    linkBuilder.prototype().classes().set( classes );
    addLink( linkBuilder.newInstance() );
    return (T) this;
  }
  catch( UnsupportedEncodingException e )
  {
    e.printStackTrace();
    return (T) this;
  }
}
origin: apache/attic-polygene-java

prototype.classes().set( "query" );
prototype.text().set( humanReadable( query.getName() ) );
prototype.href().set( query.getName().toLowerCase() );
prototype.rel().set( query.getName().toLowerCase() );
prototype.id().set( query.getName().toLowerCase() );
prototype.classes().set( "command" );
prototype.text().set( humanReadable( command.getName() ) );
prototype.href().set( command.getName().toLowerCase() );
prototype.rel().set( command.getName().toLowerCase() );
prototype.id().set( command.getName().toLowerCase() );
prototype.classes().set( "resource" );
prototype.text().set( humanReadable( subResource.getName() ) );
prototype.href().set( subResource.getName().toLowerCase() + "/" );
prototype.rel().set( subResource.getName().toLowerCase() );
prototype.id().set( subResource.getName().toLowerCase() );
origin: org.apache.polygene.libraries/org.apache.polygene.library.rest-server

prototype.classes().set( "query" );
prototype.text().set( humanReadable( query.getName() ) );
prototype.href().set( query.getName().toLowerCase() );
prototype.rel().set( query.getName().toLowerCase() );
prototype.id().set( query.getName().toLowerCase() );
prototype.classes().set( "command" );
prototype.text().set( humanReadable( command.getName() ) );
prototype.href().set( command.getName().toLowerCase() );
prototype.rel().set( command.getName().toLowerCase() );
prototype.id().set( command.getName().toLowerCase() );
prototype.classes().set( "resource" );
prototype.text().set( humanReadable( subResource.getName() ) );
prototype.href().set( subResource.getName().toLowerCase() + "/" );
prototype.rel().set( subResource.getName().toLowerCase() );
prototype.id().set( subResource.getName().toLowerCase() );
origin: apache/attic-polygene-java

public T addLink( String description, String id, String rel, String href, String classes )
{
  linkBuilder.prototype().text().set( description );
  linkBuilder.prototype().id().set( id );
  linkBuilder.prototype().rel().set( rel );
  linkBuilder.prototype().href().set( href );
  linkBuilder.prototype().classes().set( classes );
  addLink( linkBuilder.newInstance() );
  return (T) this;
}
origin: apache/attic-polygene-java

Reference reference = new Reference( response.getRequest().getResourceRef(), link.href().get() );
response.setLocationRef( reference );
return true;
origin: org.apache.polygene.libraries/org.apache.polygene.library.rest-server

Reference reference = new Reference( response.getRequest().getResourceRef(), link.href().get() );
response.setLocationRef( reference );
return true;
org.apache.polygene.library.rest.common.linkLinkhref

Javadoc

This is the href of the entity, relative to the producer of the LinkValue

Popular methods of Link

  • rel
  • classes
  • id
  • text

Popular in Java

  • Making http post requests using okhttp
  • getResourceAsStream (ClassLoader)
  • addToBackStack (FragmentTransaction)
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • HttpServer (com.sun.net.httpserver)
    This class implements a simple HTTP server. A HttpServer is bound to an IP address and port number a
  • FileReader (java.io)
    A specialized Reader that reads from a file in the file system. All read requests made by calling me
  • PrintStream (java.io)
    Fake signature of an existing Java class.
  • Thread (java.lang)
    A thread is a thread of execution in a program. The Java Virtual Machine allows an application to ha
  • SimpleDateFormat (java.text)
    Formats and parses dates in a locale-sensitive manner. Formatting turns a Date into a String, and pa
  • PriorityQueue (java.util)
    A PriorityQueue holds elements on a priority heap, which orders the elements according to their natu
  • Best IntelliJ 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