@Singleton public class BaseAdministrationService extends Object implements AdministrationService
Modifier and Type | Field and Description |
---|---|
protected RestContext<AbiquoApi,AbiquoAsyncApi> |
context |
protected com.google.common.base.Supplier<Enterprise> |
currentEnterprise |
protected com.google.common.base.Supplier<User> |
currentUser |
protected ListCategories |
listCategories |
protected ListDatacenters |
listDatacenters |
protected ListEnterprises |
listEnterprises |
protected ListLicenses |
listLicenses |
protected ListMachines |
listMachines |
protected ListPrivileges |
listPrivileges |
protected ListProperties |
listProperties |
protected ListRoles |
listRoles |
Modifier | Constructor and Description |
---|---|
protected |
BaseAdministrationService(RestContext<AbiquoApi,AbiquoAsyncApi> context,
ListDatacenters listDatacenters,
ListMachines listMachines,
ListEnterprises listEnterprises,
ListRoles listRoles,
ListLicenses listLicenses,
ListPrivileges listPrivileges,
ListProperties listProperties,
ListCategories listCategories,
com.google.common.base.Supplier<User> currentUser,
com.google.common.base.Supplier<Enterprise> currentEnterprise) |
Modifier and Type | Method and Description |
---|---|
Category |
findCategory(com.google.common.base.Predicate<Category> filter)
Get the first categories that matches the given filter or
null if none is found. |
Datacenter |
findDatacenter(com.google.common.base.Predicate<Datacenter> filter)
Get the first datacenter that matches the given filter or
null if none is found. |
Enterprise |
findEnterprise(com.google.common.base.Predicate<Enterprise> filter)
Get the first enterprises that matches the given filter or
null if none is
found. |
License |
findLicense(com.google.common.base.Predicate<License> filter)
Get the first license that matches the given filter or
null if none is found. |
Machine |
findMachine(com.google.common.base.Predicate<Machine> filter)
Get the first machine in the infrastructure that matches the given filter.
|
Privilege |
findPrivilege(com.google.common.base.Predicate<Privilege> filter)
Privilege
|
Role |
findRole(com.google.common.base.Predicate<Role> filter)
Get the first role that matches the given filter or
null if none is found. |
SystemProperty |
findSystemProperty(com.google.common.base.Predicate<SystemProperty> filter)
Get the first system property that matches the given filter or
null if none is
found. |
Enterprise |
getCurrentEnterprise()
Get the enterprise of the current user.
|
User |
getCurrentUser()
User
|
Datacenter |
getDatacenter(Integer datacenterId)
Get the datacenter with the given id.
|
Iterable<Datacenter> |
getDatacenters(List<Integer> datacenterIds)
Get the list of datacenters with the given ids.
|
Enterprise |
getEnterprise(Integer enterpriseId)
Get the enterprise with the given id.
|
EnterpriseProperties |
getEnterpriseProperties(Enterprise enterprise)
Enterprise Properties
|
Role |
getRole(Integer roleId)
Get the role with the given id.
|
SystemProperty |
getSystemProperty(String name)
Get the system property with the give name or
null if none is found. |
Iterable<Category> |
listCategories()
Get the list of categories.
|
Iterable<Category> |
listCategories(com.google.common.base.Predicate<Category> filter)
Get the list of categories matching the given filter.
|
Iterable<Datacenter> |
listDatacenters()
Datacenter **********************
|
Iterable<Datacenter> |
listDatacenters(com.google.common.base.Predicate<Datacenter> filter)
Get the list of datacenters matching the given filter.
|
Iterable<Enterprise> |
listEnterprises()
Enterprise
|
Iterable<Enterprise> |
listEnterprises(com.google.common.base.Predicate<Enterprise> filter)
Get the list of enterprises matching the given filter.
|
Iterable<License> |
listLicenses()
License
|
Iterable<License> |
listLicenses(boolean active)
Get the list of all active/inactive licenses.
|
Iterable<License> |
listLicenses(com.google.common.base.Predicate<License> filter)
Get the list of licenses matching the given filter.
|
Iterable<Machine> |
listMachines()
Machine
|
Iterable<Machine> |
listMachines(com.google.common.base.Predicate<Machine> filter)
Get the list of all machines in the infrastructure matching the given filter.
|
Iterable<Privilege> |
listPrivileges()
Get the list of global privileges.
|
Iterable<Privilege> |
listPrivileges(com.google.common.base.Predicate<Privilege> filter)
Get the list of privileges matching the given filter.
|
Iterable<Role> |
listRoles()
Role **********************
|
Iterable<Role> |
listRoles(com.google.common.base.Predicate<Role> filter)
Get the list of roles matching the given filter.
|
Iterable<SystemProperty> |
listSystemProperties()
System Properties
|
Iterable<SystemProperty> |
listSystemProperties(com.google.common.base.Predicate<SystemProperty> filter)
Get the list of system properties matching the given filter.
|
Iterable<SystemProperty> |
listSystemProperties(String component)
Get the list of system properties with options.
|
protected RestContext<AbiquoApi,AbiquoAsyncApi> context
protected final ListDatacenters listDatacenters
protected final ListMachines listMachines
protected final ListEnterprises listEnterprises
protected final ListRoles listRoles
protected final ListLicenses listLicenses
protected final ListPrivileges listPrivileges
protected final ListProperties listProperties
protected final ListCategories listCategories
protected final com.google.common.base.Supplier<User> currentUser
protected final com.google.common.base.Supplier<Enterprise> currentEnterprise
@Inject protected BaseAdministrationService(RestContext<AbiquoApi,AbiquoAsyncApi> context, ListDatacenters listDatacenters, ListMachines listMachines, ListEnterprises listEnterprises, ListRoles listRoles, ListLicenses listLicenses, ListPrivileges listPrivileges, ListProperties listProperties, ListCategories listCategories, com.google.common.base.Supplier<User> currentUser, com.google.common.base.Supplier<Enterprise> currentEnterprise)
public Iterable<Datacenter> listDatacenters()
listDatacenters
in interface AdministrationService
public Iterable<Datacenter> listDatacenters(com.google.common.base.Predicate<Datacenter> filter)
AdministrationService
listDatacenters
in interface AdministrationService
public Datacenter getDatacenter(Integer datacenterId)
AdministrationService
getDatacenter
in interface AdministrationService
public Datacenter findDatacenter(com.google.common.base.Predicate<Datacenter> filter)
AdministrationService
null
if none is found.findDatacenter
in interface AdministrationService
public Iterable<Datacenter> getDatacenters(List<Integer> datacenterIds)
AdministrationService
getDatacenters
in interface AdministrationService
public Iterable<Machine> listMachines()
listMachines
in interface AdministrationService
public Iterable<Machine> listMachines(com.google.common.base.Predicate<Machine> filter)
AdministrationService
listMachines
in interface AdministrationService
public Machine findMachine(com.google.common.base.Predicate<Machine> filter)
AdministrationService
findMachine
in interface AdministrationService
public Iterable<Enterprise> listEnterprises()
listEnterprises
in interface AdministrationService
public Iterable<Enterprise> listEnterprises(com.google.common.base.Predicate<Enterprise> filter)
AdministrationService
listEnterprises
in interface AdministrationService
public Enterprise findEnterprise(com.google.common.base.Predicate<Enterprise> filter)
AdministrationService
null
if none is
found.findEnterprise
in interface AdministrationService
public Enterprise getEnterprise(Integer enterpriseId)
AdministrationService
getEnterprise
in interface AdministrationService
public EnterpriseProperties getEnterpriseProperties(Enterprise enterprise)
getEnterpriseProperties
in interface AdministrationService
public Iterable<Role> listRoles()
listRoles
in interface AdministrationService
public Iterable<Role> listRoles(com.google.common.base.Predicate<Role> filter)
AdministrationService
listRoles
in interface AdministrationService
public Role findRole(com.google.common.base.Predicate<Role> filter)
AdministrationService
null
if none is found.findRole
in interface AdministrationService
public Role getRole(Integer roleId)
AdministrationService
getRole
in interface AdministrationService
public Privilege findPrivilege(com.google.common.base.Predicate<Privilege> filter)
findPrivilege
in interface AdministrationService
public Iterable<Privilege> listPrivileges()
AdministrationService
listPrivileges
in interface AdministrationService
public Iterable<Privilege> listPrivileges(com.google.common.base.Predicate<Privilege> filter)
AdministrationService
listPrivileges
in interface AdministrationService
public User getCurrentUser()
getCurrentUser
in interface AdministrationService
public Enterprise getCurrentEnterprise()
AdministrationService
getCurrentEnterprise
in interface AdministrationService
public Iterable<License> listLicenses()
listLicenses
in interface AdministrationService
public Iterable<License> listLicenses(boolean active)
AdministrationService
listLicenses
in interface AdministrationService
active
- Defines if searching for active (true
) or inactive (
false
) licenses.public Iterable<License> listLicenses(com.google.common.base.Predicate<License> filter)
AdministrationService
listLicenses
in interface AdministrationService
public License findLicense(com.google.common.base.Predicate<License> filter)
AdministrationService
null
if none is found.findLicense
in interface AdministrationService
public Iterable<SystemProperty> listSystemProperties()
listSystemProperties
in interface AdministrationService
public Iterable<SystemProperty> listSystemProperties(com.google.common.base.Predicate<SystemProperty> filter)
AdministrationService
listSystemProperties
in interface AdministrationService
public SystemProperty findSystemProperty(com.google.common.base.Predicate<SystemProperty> filter)
AdministrationService
null
if none is
found.findSystemProperty
in interface AdministrationService
public SystemProperty getSystemProperty(String name)
AdministrationService
null
if none is found.getSystemProperty
in interface AdministrationService
public Iterable<SystemProperty> listSystemProperties(String component)
AdministrationService
listSystemProperties
in interface AdministrationService
public Category findCategory(com.google.common.base.Predicate<Category> filter)
AdministrationService
null
if none is found.findCategory
in interface AdministrationService
public Iterable<Category> listCategories()
AdministrationService
listCategories
in interface AdministrationService
public Iterable<Category> listCategories(com.google.common.base.Predicate<Category> filter)
AdministrationService
listCategories
in interface AdministrationService
Copyright © 2009-2013 jclouds. All Rights Reserved.