public class TemplatePermissions extends CollectionDecorator<Permission,Permissions,TemplatePermission>
TemplatePermissions providing relation and functional services
to Permissions
.
Constructor and Description |
---|
TemplatePermissions(HttpProxyBroker proxy,
Template parent) |
Modifier and Type | Method and Description |
---|---|
TemplatePermission |
add(Permission permission)
Adds Permission object.
|
TemplatePermission |
add(Permission permission,
String expect)
Adds Permission object.
|
TemplatePermission |
add(Permission permission,
String expect,
String correlationId)
Adds Permission object.
|
TemplatePermission |
get(UUID id)
Fetches TemplatePermission object by id.
|
TemplatePermission |
getById(String id)
Fetches TemplatePermission object by id.
|
List<TemplatePermission> |
list()
Lists TemplatePermission objects.
|
List<TemplatePermission> |
list(Integer max)
Lists TemplatePermission objects.
|
get
public TemplatePermissions(HttpProxyBroker proxy, Template parent)
proxy
- HttpProxyBrokerparent
- Templatepublic List<TemplatePermission> list() throws org.apache.http.client.ClientProtocolException, ServerException, IOException
list
in class CollectionDecorator<Permission,Permissions,TemplatePermission>
TemplatePermission
org.apache.http.client.ClientProtocolException
- Signals that HTTP/S protocol error has occurred.ServerException
- Signals that an oVirt api error has occurred.IOException
- Signals that an I/O exception of some sort has occurred.public TemplatePermission get(UUID id) throws org.apache.http.client.ClientProtocolException, ServerException, IOException
get
in class CollectionDecorator<Permission,Permissions,TemplatePermission>
id
- entity idTemplatePermission
org.apache.http.client.ClientProtocolException
- Signals that HTTP/S protocol error has occurred.ServerException
- Signals that an oVirt api error has occurred.IOException
- Signals that an I/O exception of some sort has occurred.public TemplatePermission getById(String id) throws org.apache.http.client.ClientProtocolException, ServerException, IOException
getById
in class CollectionDecorator<Permission,Permissions,TemplatePermission>
id
- entity idTemplatePermission
org.apache.http.client.ClientProtocolException
- Signals that HTTP/S protocol error has occurred.ServerException
- Signals that an oVirt api error has occurred.IOException
- Signals that an I/O exception of some sort has occurred.public TemplatePermission add(Permission permission) throws org.apache.http.client.ClientProtocolException, ServerException, IOException
permission
- Permission
Overload 1: add a new user level permission on the template permission.user.id permission.role.id|name Overload 2: add a new role permission on the template permission.group.id permission.role.id|name
TemplatePermission
org.apache.http.client.ClientProtocolException
- Signals that HTTP/S protocol error has occurred.ServerException
- Signals that an oVirt api error has occurred.IOException
- Signals that an I/O exception of some sort has occurred.public TemplatePermission add(Permission permission, String expect) throws org.apache.http.client.ClientProtocolException, ServerException, IOException
permission
- Permission
Overload 1: add a new user level permission on the template permission.user.id permission.role.id|name Overload 2: add a new role permission on the template permission.group.id permission.role.id|name
expect
- [201-created]
TemplatePermission
org.apache.http.client.ClientProtocolException
- Signals that HTTP/S protocol error has occurred.ServerException
- Signals that an oVirt api error has occurred.IOException
- Signals that an I/O exception of some sort has occurred.public TemplatePermission add(Permission permission, String expect, String correlationId) throws org.apache.http.client.ClientProtocolException, ServerException, IOException
permission
- Permission
Overload 1: add a new user level permission on the template permission.user.id permission.role.id|name Overload 2: add a new role permission on the template permission.group.id permission.role.id|name
expect
- [201-created]
correlationId
- [any string]
TemplatePermission
org.apache.http.client.ClientProtocolException
- Signals that HTTP/S protocol error has occurred.ServerException
- Signals that an oVirt api error has occurred.IOException
- Signals that an I/O exception of some sort has occurred.public List<TemplatePermission> list(Integer max) throws org.apache.http.client.ClientProtocolException, ServerException, IOException
max
- [max results]
TemplatePermission
org.apache.http.client.ClientProtocolException
- Signals that HTTP/S protocol error has occurred.ServerException
- Signals that an oVirt api error has occurred.IOException
- Signals that an I/O exception of some sort has occurred.Copyright ? 2010 Red Hat, Inc - released under the Apache License Version 2.0