Menu
Introduction
Getting Started
Developer guide
Release
Architecture
CLI
Technical documentations
Version
Publication date

Mar 9, 2022

Confidentiality
Public
Reactions
1
Share

TagOrigins

Manage the origins of a Tag.

Specific case: if the tag is originated by a user, we can have only one origin which is the user. If the tag is originated by an automatic process, we can have multiple origins. An automatic origin will always override a user origin.

:return: description :rtype: type

Functions
__init__

Initialize self. See help(type(self)) for accurate signature.

origin_type : gws_core.tag.tag_dto.TagOriginType | None
origin_id : str | None
add_origin

Add an origin to the tag. Return true if the current origins have been modified

tag_origin : TagOrigin
Return type : bool
add_origins

Add origins to the tag. Return true if the current origins have been modified

origins : list
Return type : bool
count_origins
Return type : int
get_origins
Return type : list
has_origin
origin_type : TagOriginType
origin_id : str
Return type : bool
is_empty
Return type : bool
is_user_origin
Return type : bool
merge_origins

Merge the origins of the tag with the origins of the other tag Return true if the current origins have been modified

origins : TagOrigins
Return type : bool
remove_origin
origin_type : TagOriginType
origin_id : str
remove_origins

Remove the origins of the tag with the origins of the other tag Return true if the current origins have been modified

origins : TagOrigins
set_external_lab_origin

Set the external lab origin for all origin if not already defined

external_lab_origin_id : str
set_origins
origin_type : TagOriginType
origin_id : str
to_dto
Return type : list
to_json
Return type : list
current_user_origins @classmethod
Return type : TagOrigins
from_dto @classmethod
dto : list
Return type : TagOrigins
system_origins @classmethod

Create a tag origin for a system user

Return type : TagOrigins
Shine Logo
Technical bricks to reuse or customize

Have you developed a brick?

Share it to accelerate projects for the entire community.