Class ItemLinksBuilder
- java.lang.Object
-
- org.eclipse.persistence.jpa.rs.features.ItemLinksBuilder
-
public final class ItemLinksBuilder extends java.lang.Object
ConvenientItemLinks
object builder.- Author:
- Dmitry Kornilov
- Since:
- EclipseLink 2.6.0
-
-
Constructor Summary
Constructors Constructor Description ItemLinksBuilder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ItemLinksBuilder
addAlternate(java.lang.String href)
Adds a 'alternate' link.ItemLinksBuilder
addCanonical(java.lang.String href)
Adds a 'canonical' link.ItemLinksBuilder
addCanonical(java.lang.String href, java.lang.String mediaType)
Adds a 'canonical' link.ItemLinksBuilder
addCreate(java.lang.String href)
Adds a 'create' link.ItemLinksBuilder
addDelete(java.lang.String href)
Adds a 'delete' link.ItemLinksBuilder
addDescribedBy(java.lang.String href)
Adds a 'describedBy' link.ItemLinksBuilder
addDescribes(java.lang.String href)
Adds a 'describes' link.ItemLinksBuilder
addExecute(java.lang.String href, java.lang.String method)
Adds a 'execute' link.ItemLinksBuilder
addFind(java.lang.String href)
Adds a 'find' link.ItemLinksBuilder
addNext(java.lang.String href)
Adds a 'next' link.ItemLinksBuilder
addPrev(java.lang.String href)
Adds a 'prev' link.ItemLinksBuilder
addSelf(java.lang.String href)
Adds a 'self' link.ItemLinksBuilder
addUpdate(java.lang.String href)
Adds a 'update' link.org.eclipse.persistence.internal.jpa.rs.metadata.model.ItemLinks
build()
BuildsItemLinks
object.java.util.List<org.eclipse.persistence.internal.jpa.rs.metadata.model.LinkV2>
getList()
Returns a list of links.
-
-
-
Method Detail
-
addSelf
public ItemLinksBuilder addSelf(java.lang.String href)
Adds a 'self' link.- Parameters:
href
- 'self' link- Returns:
ItemLinksBuilder
with added 'self' link.
-
addCanonical
public ItemLinksBuilder addCanonical(java.lang.String href)
Adds a 'canonical' link.- Parameters:
href
- 'canonical' link- Returns:
ItemLinksBuilder
with added 'canonical' link.
-
addCanonical
public ItemLinksBuilder addCanonical(java.lang.String href, java.lang.String mediaType)
Adds a 'canonical' link.- Parameters:
href
- 'canonical' linkmediaType
- media type- Returns:
ItemLinksBuilder
with added 'canonical' link.
-
addNext
public ItemLinksBuilder addNext(java.lang.String href)
Adds a 'next' link.- Parameters:
href
- 'next' link- Returns:
ItemLinksBuilder
with added 'next' link.
-
addPrev
public ItemLinksBuilder addPrev(java.lang.String href)
Adds a 'prev' link.- Parameters:
href
- 'prev' link- Returns:
ItemLinksBuilder
with added 'prev' link.
-
addAlternate
public ItemLinksBuilder addAlternate(java.lang.String href)
Adds a 'alternate' link. Alternate links always have "application/schema+json" media type.- Parameters:
href
- 'alternate' link- Returns:
ItemLinksBuilder
with added 'alternate' link.
-
addDescribes
public ItemLinksBuilder addDescribes(java.lang.String href)
Adds a 'describes' link.- Parameters:
href
- 'describes' link- Returns:
ItemLinksBuilder
with added 'describes' link.
-
addDescribedBy
public ItemLinksBuilder addDescribedBy(java.lang.String href)
Adds a 'describedBy' link.- Parameters:
href
- 'describedBy' link- Returns:
ItemLinksBuilder
with added 'describedBy' link.
-
addCreate
public ItemLinksBuilder addCreate(java.lang.String href)
Adds a 'create' link.- Parameters:
href
- 'create' link- Returns:
ItemLinksBuilder
with added 'create' link.
-
addFind
public ItemLinksBuilder addFind(java.lang.String href)
Adds a 'find' link.- Parameters:
href
- 'find' link- Returns:
ItemLinksBuilder
with added 'find' link.
-
addUpdate
public ItemLinksBuilder addUpdate(java.lang.String href)
Adds a 'update' link.- Parameters:
href
- 'update' link- Returns:
ItemLinksBuilder
with added 'update' link.
-
addDelete
public ItemLinksBuilder addDelete(java.lang.String href)
Adds a 'delete' link.- Parameters:
href
- 'delete' link- Returns:
ItemLinksBuilder
with added 'delete' link.
-
addExecute
public ItemLinksBuilder addExecute(java.lang.String href, java.lang.String method)
Adds a 'execute' link.- Parameters:
href
- 'execute' linkmethod
- GET/POST etc.- Returns:
ItemLinksBuilder
with added 'execute' link.
-
build
public org.eclipse.persistence.internal.jpa.rs.metadata.model.ItemLinks build()
BuildsItemLinks
object.- Returns:
ItemLinks
object.
-
getList
public java.util.List<org.eclipse.persistence.internal.jpa.rs.metadata.model.LinkV2> getList()
Returns a list of links.- Returns:
- list of links.
-
-