Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
atlas
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
dataplatform
atlas
Commits
b161859e
Commit
b161859e
authored
Mar 08, 2018
by
Nigel Jones
Committed by
Madhan Neethiraj
Mar 17, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ATLAS-2488: updated AtlasClientV2 with new methods to create/update relationship instances
Signed-off-by:
Madhan Neethiraj
<
madhan@apache.org
>
parent
1927b32b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
0 deletions
+10
-0
AtlasClientV2.java
...ient-v2/src/main/java/org/apache/atlas/AtlasClientV2.java
+10
-0
No files found.
client/client-v2/src/main/java/org/apache/atlas/AtlasClientV2.java
View file @
b161859e
...
@@ -391,6 +391,14 @@ public class AtlasClientV2 extends AtlasBaseClient {
...
@@ -391,6 +391,14 @@ public class AtlasClientV2 extends AtlasBaseClient {
callAPI
(
API_V2
.
DELETE_RELATIONSHIP_BY_GUID
,
(
Class
)
null
,
null
,
guid
);
callAPI
(
API_V2
.
DELETE_RELATIONSHIP_BY_GUID
,
(
Class
)
null
,
null
,
guid
);
}
}
public
AtlasRelationship
createRelationship
(
AtlasRelationship
relationship
)
throws
AtlasServiceException
{
return
callAPI
(
API_V2
.
CREATE_RELATIONSHIP
,
AtlasRelationship
.
class
,
relationship
);
}
public
AtlasRelationship
updateRelationship
(
AtlasRelationship
relationship
)
throws
AtlasServiceException
{
return
callAPI
(
API_V2
.
UPDATE_RELATIONSHIP
,
AtlasRelationship
.
class
,
relationship
);
}
@Override
@Override
protected
API
formatPathParameters
(
final
API
api
,
final
String
...
params
)
{
protected
API
formatPathParameters
(
final
API
api
,
final
String
...
params
)
{
return
new
API
(
String
.
format
(
api
.
getPath
(),
params
),
api
.
getMethod
(),
api
.
getExpectedStatus
());
return
new
API
(
String
.
format
(
api
.
getPath
(),
params
),
api
.
getMethod
(),
api
.
getExpectedStatus
());
...
@@ -470,6 +478,8 @@ public class AtlasClientV2 extends AtlasBaseClient {
...
@@ -470,6 +478,8 @@ public class AtlasClientV2 extends AtlasBaseClient {
public
static
final
API_V2
FACETED_SEARCH
=
new
API_V2
(
FACETED_SEARCH_URI
,
HttpMethod
.
POST
,
Response
.
Status
.
OK
);
public
static
final
API_V2
FACETED_SEARCH
=
new
API_V2
(
FACETED_SEARCH_URI
,
HttpMethod
.
POST
,
Response
.
Status
.
OK
);
public
static
final
API_V2
GET_RELATIONSHIP_BY_GUID
=
new
API_V2
(
RELATIONSHIPS_URI
+
"guid/"
,
HttpMethod
.
GET
,
Response
.
Status
.
OK
);
public
static
final
API_V2
GET_RELATIONSHIP_BY_GUID
=
new
API_V2
(
RELATIONSHIPS_URI
+
"guid/"
,
HttpMethod
.
GET
,
Response
.
Status
.
OK
);
public
static
final
API_V2
DELETE_RELATIONSHIP_BY_GUID
=
new
API_V2
(
RELATIONSHIPS_URI
+
"guid/"
,
HttpMethod
.
DELETE
,
Response
.
Status
.
NO_CONTENT
);
public
static
final
API_V2
DELETE_RELATIONSHIP_BY_GUID
=
new
API_V2
(
RELATIONSHIPS_URI
+
"guid/"
,
HttpMethod
.
DELETE
,
Response
.
Status
.
NO_CONTENT
);
public
static
final
API_V2
CREATE_RELATIONSHIP
=
new
API_V2
(
RELATIONSHIPS_URI
,
HttpMethod
.
POST
,
Response
.
Status
.
OK
);
public
static
final
API_V2
UPDATE_RELATIONSHIP
=
new
API_V2
(
RELATIONSHIPS_URI
,
HttpMethod
.
PUT
,
Response
.
Status
.
OK
);
private
API_V2
(
String
path
,
String
method
,
Response
.
Status
status
)
{
private
API_V2
(
String
path
,
String
method
,
Response
.
Status
status
)
{
super
(
path
,
method
,
status
);
super
(
path
,
method
,
status
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment