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
9300924f
Commit
9300924f
authored
Dec 13, 2018
by
nixonrodrigues
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ATLAS-2995 : Added new API method to disassociate the term assignment from entity.
Change-Id: I6655626c937bf629ba5bffcbfce8f5c1fbbd0ed9
parent
beb34506
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
5 deletions
+27
-5
VGlossary.js
dashboardv2/public/js/models/VGlossary.js
+1
-1
GlossaryREST.java
...src/main/java/org/apache/atlas/web/rest/GlossaryREST.java
+26
-4
No files found.
dashboardv2/public/js/models/VGlossary.js
View file @
9300924f
...
...
@@ -106,7 +106,7 @@ define(['require',
contentType
:
'application/json'
,
dataType
:
'json'
},
options
);
return
this
.
constructor
.
nonCrudOperation
.
call
(
this
,
url
,
'
DELETE
'
,
options
);
return
this
.
constructor
.
nonCrudOperation
.
call
(
this
,
url
,
'
PUT
'
,
options
);
},
removeTermFromCategory
:
function
()
{
...
...
webapp/src/main/java/org/apache/atlas/web/rest/GlossaryREST.java
View file @
9300924f
...
...
@@ -857,21 +857,43 @@ public class GlossaryREST {
@DELETE
@Path
(
"/terms/{termGuid}/assignedEntities"
)
public
void
removeTermAssignmentFromEntities
(
@PathParam
(
"termGuid"
)
String
termGuid
,
List
<
AtlasRelatedObjectId
>
relatedObjectIds
)
throws
AtlasBaseException
{
Servlets
.
validateQueryParamLength
(
"termGuid"
,
termGuid
);
removeTermFromGlossary
(
termGuid
,
relatedObjectIds
);
}
/**
* Remove the term assignment for the given list of entity headers
* @param termGuid Glossary term GUID
* @param relatedObjectIds List of related entity IDs from which the term has to be dissociated
* @throws AtlasBaseException
* @HTTP 204 If glossary term dissociation was successful
* @HTTP 400 If ANY of the entity header is invalid
* @HTTP 404 If glossary term guid in invalid
*/
@PUT
@Path
(
"/terms/{termGuid}/assignedEntities"
)
public
void
disassociateTermAssignmentFromEntities
(
@PathParam
(
"termGuid"
)
String
termGuid
,
List
<
AtlasRelatedObjectId
>
relatedObjectIds
)
throws
AtlasBaseException
{
removeTermFromGlossary
(
termGuid
,
relatedObjectIds
);
}
private
void
removeTermFromGlossary
(
String
termGuid
,
List
<
AtlasRelatedObjectId
>
relatedObjectIds
)
throws
AtlasBaseException
{
Servlets
.
validateQueryParamLength
(
"termGuid"
,
termGuid
)
;
AtlasPerfTracer
perf
=
null
;
try
{
if
(
AtlasPerfTracer
.
isPerfTraceEnabled
(
PERF_LOG
))
{
perf
=
AtlasPerfTracer
.
getPerfTracer
(
PERF_LOG
,
"GlossaryREST.removeTerm
AssignmentFromEntities
("
+
termGuid
+
")"
);
perf
=
AtlasPerfTracer
.
getPerfTracer
(
PERF_LOG
,
"GlossaryREST.removeTerm
FromGlossary
("
+
termGuid
+
")"
);
}
glossaryService
.
removeTermFromEntities
(
termGuid
,
relatedObjectIds
);
}
finally
{
AtlasPerfTracer
.
log
(
perf
);
}
}
}
/**
* Get all related categories (parent and children)
...
...
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