Package org.dspace.orcid.client
Class OrcidClientImpl
java.lang.Object
org.dspace.orcid.client.OrcidClientImpl
- All Implemented Interfaces:
OrcidClient
Implementation of
OrcidClient.- Author:
- Luca Giamminonni (luca.giamminonni at 4science.it)
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondeleteByPutCode(String accessToken, String orcid, String putCode, String path) Delete the ORCID object with the given putCode on the given path.getAccessToken(String code) Exchange the authorization code for an ORCID iD and 3-legged access token.<T> Optional<T>Retrieves an object from ORCID with the given putCode related to the given orcid using the public API.<T> Optional<T>Retrieves an object from ORCID with the given putCode related to the given orcid.org.orcid.jaxb.model.v3.release.record.PersonRetrieves a summary of the ORCID person related to the given orcid.Retrieves an /read-public access token using a client-credentials OAuth flow, or 2-step OAuth.org.orcid.jaxb.model.v3.release.record.WorkBulkgetWorkBulk(String accessToken, String orcid, List<String> putCodes) Retrieves all the works with the given putCodes related to the given orcidorg.orcid.jaxb.model.v3.release.record.WorkBulkgetWorkBulk(String orcid, List<String> putCodes) Retrieves all the works with the given putCodes related to the given orcidorg.orcid.jaxb.model.v3.release.record.summary.WorksRetrieves all the works related to the given orcid.org.orcid.jaxb.model.v3.release.record.summary.WorksRetrieves all the works related to the given orcid.Push the given object to ORCID.voidrevokeToken(OrcidToken orcidToken) Revokes the given with a POST method.Update the object with the given putCode.
-
Constructor Details
-
OrcidClientImpl
-
-
Method Details
-
getAccessToken
Description copied from interface:OrcidClientExchange the authorization code for an ORCID iD and 3-legged access token. The authorization code expires upon use.- Specified by:
getAccessTokenin interfaceOrcidClient- Parameters:
code- the authorization code- Returns:
- the ORCID token
-
getPerson
Description copied from interface:OrcidClientRetrieves a summary of the ORCID person related to the given orcid.- Specified by:
getPersonin interfaceOrcidClient- Parameters:
accessToken- the access tokenorcid- the orcid id of the record to retrieve- Returns:
- the Person
-
getWorks
public org.orcid.jaxb.model.v3.release.record.summary.Works getWorks(String accessToken, String orcid) Description copied from interface:OrcidClientRetrieves all the works related to the given orcid.- Specified by:
getWorksin interfaceOrcidClient- Parameters:
accessToken- the access tokenorcid- the orcid id related to the works- Returns:
- the Works
-
getWorks
Description copied from interface:OrcidClientRetrieves all the works related to the given orcid.- Specified by:
getWorksin interfaceOrcidClient- Parameters:
orcid- the orcid id related to the works- Returns:
- the Works
-
getWorkBulk
public org.orcid.jaxb.model.v3.release.record.WorkBulk getWorkBulk(String accessToken, String orcid, List<String> putCodes) Description copied from interface:OrcidClientRetrieves all the works with the given putCodes related to the given orcid- Specified by:
getWorkBulkin interfaceOrcidClient- Parameters:
accessToken- the access tokenorcid- the orcid idputCodes- the putCodes of the works to retrieve- Returns:
- the Works
-
getWorkBulk
public org.orcid.jaxb.model.v3.release.record.WorkBulk getWorkBulk(String orcid, List<String> putCodes) Description copied from interface:OrcidClientRetrieves all the works with the given putCodes related to the given orcid- Specified by:
getWorkBulkin interfaceOrcidClient- Parameters:
orcid- the orcid idputCodes- the putCodes of the works to retrieve- Returns:
- the Works
-
getObject
Description copied from interface:OrcidClientRetrieves an object from ORCID with the given putCode related to the given orcid.- Specified by:
getObjectin interfaceOrcidClient- Parameters:
accessToken- the access tokenorcid- the orcid idputCode- the object's put codeclazz- the object's class- Returns:
- the Object, if any
-
getObject
Description copied from interface:OrcidClientRetrieves an object from ORCID with the given putCode related to the given orcid using the public API.- Specified by:
getObjectin interfaceOrcidClient- Parameters:
orcid- the orcid idputCode- the object's put codeclazz- the object's class- Returns:
- the Object, if any
-
push
Description copied from interface:OrcidClientPush the given object to ORCID.- Specified by:
pushin interfaceOrcidClient- Parameters:
accessToken- the access tokenorcid- the orcid idobject- the orcid object to push- Returns:
- the orcid response if no error occurs
-
update
Description copied from interface:OrcidClientUpdate the object with the given putCode.- Specified by:
updatein interfaceOrcidClient- Parameters:
accessToken- the access tokenorcid- the orcid idobject- the orcid object to pushputCode- the put code of the resource to delete- Returns:
- the orcid response if no error occurs
-
deleteByPutCode
Description copied from interface:OrcidClientDelete the ORCID object with the given putCode on the given path.- Specified by:
deleteByPutCodein interfaceOrcidClient- Parameters:
accessToken- the access tokenorcid- the orcid idputCode- the put code of the resource to deletepath- the path of the resource to delete- Returns:
- the orcid response if no error occurs
-
revokeToken
Description copied from interface:OrcidClientRevokes the given with a POST method.- Specified by:
revokeTokenin interfaceOrcidClient- Parameters:
orcidToken- the access token to revoke
-
getReadPublicAccessToken
Description copied from interface:OrcidClientRetrieves an /read-public access token using a client-credentials OAuth flow, or 2-step OAuth.- Specified by:
getReadPublicAccessTokenin interfaceOrcidClient- Returns:
- the ORCID token
-