@PermitAll public class OrganizationServiceImpl extends Object implements OrganizationService
| Constructor and Description |
|---|
OrganizationServiceImpl() |
| Modifier and Type | Method and Description |
|---|---|
Organization |
createOrganization(String name,
String description,
Persona owner)
Creates a new organization and a "SuperUser" membership for the persona.
|
void |
deleteOrganization(Organization organization)
Removes the organization and all related memberships
|
Organization |
get(String id)
Retrieves an
Organization based on its ID. |
List<Organization> |
getOrganizationsForPersona(Persona persona)
Retrieves the Organizations to which a given Persona directly is member/owner of.
|
List<Organization> |
getOrganizationsFromMemberships(List<OrganizationMembership> memberships)
Extracts all organizations from a list of memberships.
|
public List<Organization> getOrganizationsForPersona(Persona persona)
OrganizationServicegetOrganizationsForPersona in interface OrganizationServicepersona - the personapublic List<Organization> getOrganizationsFromMemberships(List<OrganizationMembership> memberships)
OrganizationServicegetOrganizationsFromMemberships in interface OrganizationServicememberships - the list of OrganizationMembershipOrganization extracted from the membershipspublic Organization createOrganization(String name, String description, Persona owner)
OrganizationServicecreateOrganization in interface OrganizationServicename - the organization's namedescription - the organization's descriptionowner - the persona that owns the organizationpublic void deleteOrganization(Organization organization)
OrganizationServicedeleteOrganization in interface OrganizationServiceorganization - the organization to be removedpublic Organization get(String id)
OrganizationServiceOrganization based on its ID.get in interface OrganizationServiceid - the organization's IDOrganization or null if the resource doesn't exists.Copyright © 2015 Red Hat, Inc.. All rights reserved.