Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

more groups docstrings #105

Merged
merged 1 commit into from
Jul 15, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 33 additions & 7 deletions src/cral/alfresco/core/groups.clj
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,14 @@
opts)))

(defn create-group
"Create a group."
"Create a group.
The group id must start with \"GROUP_\". If this is omitted it will be added automatically.
This format is also returned when listing groups or group memberships. It should be noted that the other group-related operations also expect the id to start with \"GROUP_\".
If one or more **parent-ids** are specified then the group will be created and become a membe of each of the specified parent groups.
If no **parent-ids** are specified then the group will be created as a root group.
The group will be created in the **APP.DEFAULT** and **AUTH.ALF** zones.
You must have admin rights to create a group.
More info [here](https://api-explorer.alfresco.com/api-explorer/?urls.primaryName=Core%20API#/groups/createGroup)."
([^Ticket ticket ^CreateGroupBody body]
(create-group ticket body nil))
([^Ticket ticket ^CreateGroupBody body ^CreateGroupQueryParams query-params & [^PersistentHashMap opts]]
Expand All @@ -65,7 +72,9 @@
opts)))

(defn get-group-details
"Get details for group group-id."
"Get details for **group group-id**.
You can use the **include** parameter to return additional information.
More info [here](https://api-explorer.alfresco.com/api-explorer/?urls.primaryName=Core%20API#/groups/getGroup)."
([^Ticket ticket ^String group-id]
(get-group-details ticket group-id nil))
([^Ticket ticket ^String group-id ^GetGroupDetailsQueryParams query-params & [^PersistentHashMap opts]]
Expand All @@ -77,7 +86,9 @@
opts)))

(defn update-group-details
"Update details (display-name) for group group-id."
"Update details (display-name) for group **group-id**.
You must have admin rights to update a group.
More info [here](https://api-explorer.alfresco.com/api-explorer/?urls.primaryName=Core%20API#/groups/updateGroup)."
([^Ticket ticket ^String group-id ^UpdateGroupBody body]
(update-group-details ticket group-id body nil))
([^Ticket ticket ^String group-id ^UpdateGroupBody body ^UpdateGroupQueryParams query-params & [^PersistentHashMap opts]]
Expand All @@ -91,7 +102,12 @@
opts)))

(defn delete-group
"Delete group group-id."
"Delete group **group-id**.
The option to cascade delete applies this recursively to any hierarchy of group members.
In this case, removing a group member does not delete the person or sub-group itself.
If a removed sub-group no longer has any parent groups then it becomes a root group.
You must have admin rights to delete a group.
More info [here](https://api-explorer.alfresco.com/api-explorer/?urls.primaryName=Core%20API#/groups/deleteGroup)."
([^Ticket ticket ^String group-id]
(delete-group ticket group-id nil))
([^Ticket ticket ^String group-id ^DeleteGroupQueryParams query-params & [^PersistentHashMap opts]]
Expand All @@ -103,7 +119,11 @@
opts)))

(defn create-group-membership
"Create a group membership (for an existing person or group) within a group group-id."
"Create a group membership (for an existing person or group) within a group **group-id**.
If the added group was previously a root group then it becomes a non-root group since it now has a parent.
It is an error to specify an id that does not exist.
You must have admin rights to create a group membership.
More info [here](https://api-explorer.alfresco.com/api-explorer/?urls.primaryName=Core%20API#/groups/createGroupMembership)."
([^Ticket ticket ^String group-id ^CreateGroupMembershipBody body]
(create-group-membership ticket group-id body nil))
([^Ticket ticket ^String group-id ^CreateGroupMembershipBody body ^CreateGroupMembershipQueryParams query-params & [^PersistentHashMap opts]]
Expand All @@ -117,7 +137,9 @@
opts)))

(defn list-group-memberships
"Gets a list of the group memberships for the group group-id."
"Gets a list of the group memberships for the group **group-id**.
You can use the where parameter to filter the returned groups by **member-type**.
More info [here](https://api-explorer.alfresco.com/api-explorer/?urls.primaryName=Core%20API#/groups/listGroupMemberships)."
([^Ticket ticket ^String group-id]
(list-group-memberships ticket group-id nil))
([^Ticket ticket ^String group-id ^ListGroupMembershipsQueryParams query-params & [^PersistentHashMap opts]]
Expand All @@ -129,7 +151,11 @@
opts)))

(defn delete-group-membership
"Delete group member group-member-id (person or sub-group) from group group-id."
"Delete group member **group-member-id** (person or sub-group) from group **group-id**.
Removing a group member does not delete the person or sub-group itself.
If a removed sub-group no longer has any parent groups then it becomes a root group.
You must have admin rights to delete a group membership.
More info [here](https://api-explorer.alfresco.com/api-explorer/?urls.primaryName=Core%20API#/groups/deleteGroupMembership)."
[^Ticket ticket ^String group-id ^String group-member-id & [^PersistentHashMap opts]]
(utils/call-rest
client/delete
Expand Down