public class Projects extends AbstractCoreBulkResources<ProjectRestRep> implements ACLResources, QuotaResources, TenantResources<ProjectRestRep>
Base URL: /projects
Constructor and Description |
---|
Projects(ViPRCoreClient parent,
RestClient client) |
Modifier and Type | Method and Description |
---|---|
ProjectRestRep |
create(ProjectParam input)
Creates a project in the user's tenant.
|
ProjectRestRep |
create(java.net.URI tenantId,
ProjectParam input)
Creates a project in the given tenant.
|
void |
deactivate(java.net.URI id)
Deactivates the given project by ID.
|
java.util.List<ACLEntry> |
getACLs(java.net.URI id)
Gets the ACL entries for a given resource by ID.
|
java.util.List<ProjectRestRep> |
getByTenant(java.net.URI tenantId)
Gets the resources associated with a given tenant.
|
java.util.List<ProjectRestRep> |
getByTenant(java.net.URI tenantId,
ResourceFilter<ProjectRestRep> filter)
Gets the resources associated with a given tenant, optionally filtering the results as they are returned.
|
java.util.List<ProjectRestRep> |
getByUserTenant()
Convenience method for retrieving by user's current tenant.
|
java.util.List<ProjectRestRep> |
getByUserTenant(ResourceFilter<ProjectRestRep> filter)
Convenience method for retrieving by user's current tenant.
|
QuotaInfo |
getQuota(java.net.URI id)
Gets the quota information for a given resource by ID.
|
java.util.List<NamedRelatedResourceRep> |
listByTenant(java.net.URI tenantId)
Lists project by tenant by ID.
|
java.util.List<NamedRelatedResourceRep> |
listByUserTenant()
Convenience method for listing by the user's current tenant.
|
java.util.List<TypedRelatedResourceRep> |
listResources(java.net.URI id)
Lists the resources for the given project by ID.
|
void |
update(java.net.URI id,
ProjectUpdateParam input)
Updates the given project by ID.
|
java.util.List<ACLEntry> |
updateACLs(java.net.URI id,
ACLAssignmentChanges aclChanges)
Updates the ACL entries for a given resource by ID.
|
QuotaInfo |
updateQuota(java.net.URI id,
QuotaUpdateParam quota)
Updates the quota information for a given resource by ID.
|
Projects |
withInactive(boolean inactive)
Configures the fetch operations to include inactive resources.
|
Projects |
withInternal(boolean internal)
Configures the fetch operations to include internal resources.
|
getByIds, getByRefs, listBulkIds
addTags, get, get, getByIds, getByRefs, getTags, performSearch, performSearchBy, removeTags, search, updateTags
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getByIds, getByRefs
addTags, get, get, getTags, removeTags, search, updateTags
public Projects(ViPRCoreClient parent, RestClient client)
public Projects withInactive(boolean inactive)
AbstractResources
withInactive
in class AbstractResources<ProjectRestRep>
inactive
- whether to include inactive resources.public Projects withInternal(boolean internal)
AbstractResources
withInternal
in class AbstractResources<ProjectRestRep>
internal
- whether to include internal resources.public ProjectRestRep create(ProjectParam input)
input
- the project configuration.public ProjectRestRep create(java.net.URI tenantId, ProjectParam input)
API Call: POST /tenants/{tenantId}/projects
tenantId
- the ID of the tenant.input
- the project configuration.public void update(java.net.URI id, ProjectUpdateParam input)
API Call: PUT /projects/{id}
id
- the ID of the project to update.input
- the update configuration.public void deactivate(java.net.URI id)
API Call: POST /projects/{id}/deactivate
id
- the ID of project to deactivate.public java.util.List<ACLEntry> getACLs(java.net.URI id)
ACLResources
API Call: GET baseUrl/{id}/acl
getACLs
in interface ACLResources
id
- the resource ID.public java.util.List<ACLEntry> updateACLs(java.net.URI id, ACLAssignmentChanges aclChanges)
ACLResources
API Call: PUT baseUrl/{id}/acl
updateACLs
in interface ACLResources
id
- the resource ID.aclChanges
- the ACL changes to perform (ACL entries to add/remove).public java.util.List<NamedRelatedResourceRep> listByTenant(java.net.URI tenantId)
API Call: GET /tenants/{tenantId}/projects
listByTenant
in interface TenantResources<ProjectRestRep>
tenantId
- the ID of the tenant.public java.util.List<NamedRelatedResourceRep> listByUserTenant()
TenantResources
Equivalent to: listByTenant(client.getUserTenant())
listByUserTenant
in interface TenantResources<ProjectRestRep>
TenantResources.listByTenant(URI)
public java.util.List<ProjectRestRep> getByUserTenant()
TenantResources
Equivalent to: getByTenant(client.getUserTenant())
getByUserTenant
in interface TenantResources<ProjectRestRep>
TenantResources.getByTenant(URI)
public java.util.List<ProjectRestRep> getByUserTenant(ResourceFilter<ProjectRestRep> filter)
TenantResources
Equivalent to: getByTenant(client.getUserTenant(), filter)
getByUserTenant
in interface TenantResources<ProjectRestRep>
TenantResources.getByTenant(URI, ResourceFilter)
public java.util.List<ProjectRestRep> getByTenant(java.net.URI tenantId)
TenantResources
getByTenant
in interface TenantResources<ProjectRestRep>
tenantId
- the tenant ID.Resources.getByRefs(java.util.Collection)
public java.util.List<ProjectRestRep> getByTenant(java.net.URI tenantId, ResourceFilter<ProjectRestRep> filter)
TenantResources
getByTenant
in interface TenantResources<ProjectRestRep>
tenantId
- the tenant ID.filter
- the resource filter to apply to the results as they are returned (optional).Resources.getByRefs(java.util.Collection, ResourceFilter)
public QuotaInfo getQuota(java.net.URI id)
QuotaResources
API Call: GET baseUrl/{id}/quota
getQuota
in interface QuotaResources
id
- the resource ID.public QuotaInfo updateQuota(java.net.URI id, QuotaUpdateParam quota)
QuotaResources
API Call: PUT baseUrl/{id}/quota
updateQuota
in interface QuotaResources
id
- the resource ID.quota
- the update to the quota.public java.util.List<TypedRelatedResourceRep> listResources(java.net.URI id)
API Call: GET /projects/{id}/resources
id
- the ID of the project.