OpenShift Java Client 2.5.0.Final

com.openshift.internal.client.response
Class Link

java.lang.Object
  extended by com.openshift.internal.client.response.Link

public class Link
extends Object

The Class Link.

Author:
Xavier Coulon

Constructor Summary
  Link(String href, HttpMethod httpMethod)
           
  Link(String rel, String href, HttpMethod httpMethod)
           
protected Link(String rel, String href, HttpMethod httpMethod, List<LinkParameter> requiredParams, List<LinkParameter> optionalParams)
          Instantiates a new Link object.
protected Link(String rel, String href, String httpMethod, List<LinkParameter> requiredParams, List<LinkParameter> optionalParams)
           
 
Method Summary
 String getHref()
          Gets the url/href this link points to.
 String getHref(String server, String servicePath, List<Parameter> urlParameters)
           
 String getHref(String server, String servicePath, Parameter... urlParameters)
           
 HttpMethod getHttpMethod()
          Gets the http method this link operates on.
 List<LinkParameter> getOptionalParams()
          Gets the optional params.
 String getRel()
          Gets the related resource (destination) this link points to.
 List<LinkParameter> getRequiredParams()
          Gets the required params.
 boolean hasParameter(String name)
           
 String toString()
           
 void validateRequestParameters(Parameter[] parameters)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Link

public Link(String href,
            HttpMethod httpMethod)

Link

public Link(String rel,
            String href,
            HttpMethod httpMethod)

Link

protected Link(String rel,
               String href,
               String httpMethod,
               List<LinkParameter> requiredParams,
               List<LinkParameter> optionalParams)

Link

protected Link(String rel,
               String href,
               HttpMethod httpMethod,
               List<LinkParameter> requiredParams,
               List<LinkParameter> optionalParams)
Instantiates a new Link object.

Parameters:
rel - the related resource this link points to
href - the href the url/href this link points to
httpMethod - the http method that this link operates on
requiredParams - the required params
optionalParams - the optional params
Method Detail

getRel

public final String getRel()
Gets the related resource (destination) this link points to.

Returns:
the rel

getHref

public final String getHref()
Gets the url/href this link points to.

Returns:
the href

getHref

public final String getHref(String server,
                            String servicePath,
                            Parameter... urlParameters)

getHref

public final String getHref(String server,
                            String servicePath,
                            List<Parameter> urlParameters)

getHttpMethod

public final HttpMethod getHttpMethod()
Gets the http method this link operates on.

Returns:
the httpMethod

getRequiredParams

public final List<LinkParameter> getRequiredParams()
Gets the required params.

Returns:
the requiredParams

getOptionalParams

public final List<LinkParameter> getOptionalParams()
Gets the optional params.

Returns:
the optionalParams

hasParameter

public boolean hasParameter(String name)

validateRequestParameters

public void validateRequestParameters(Parameter[] parameters)
                               throws OpenShiftRequestException
Throws:
OpenShiftRequestException

toString

public String toString()
Overrides:
toString in class Object

OpenShift Java Client 2.5.0.Final

Copyright © 2014 JBoss, a division of Red Hat, Inc.. All Rights Reserved.