public class BasicGadgetAdminStore extends Object implements GadgetAdminStore
| Constructor and Description |
|---|
BasicGadgetAdminStore(FeatureRegistryProvider featureRegistryProvider,
ContainerConfig config,
ServerAdminData serverAdminData)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
checkFeatureAdminInfo(Gadget gadget)
Checks the feature administration data for a gadget.
|
Set<String> |
getAdditionalRpcServiceIds(Gadget gadget)
Gets additional RPC service IDs to allow for the gadget.
|
ContainerAdminData |
getContainerAdminData(String container)
Gets container administration data.
|
GadgetAdminData |
getGadgetAdminData(String container,
String gadgetUrl)
Gets the administration data for a gadget in a container.
|
ServerAdminData |
getServerAdminData()
Gets the administration data for the server.
|
void |
init(String store)
Inits the store from a JSON String representing the gadget administration information.
|
boolean |
isAllowedFeature(Feature feature,
Gadget gadget)
If feature administration is enabled for the given container then check to see if the feature
is allowed.
|
boolean |
isWhitelisted(String container,
String gadgetUrl)
Determines whether a gadget is on the whitelist of trusted gadgets set by the admin.
|
void |
setContainerAdminData(String container,
ContainerAdminData containerAdminData)
Sets the container administration data..
|
void |
setGadgetAdminData(String container,
String gadgetUrl,
GadgetAdminData adminData)
Sets gadget administration data for a gadget in a container.
|
@Inject public BasicGadgetAdminStore(FeatureRegistryProvider featureRegistryProvider, ContainerConfig config, ServerAdminData serverAdminData)
public void init(String store) throws GadgetException
store - a JSON String representing the gadget administration information.GadgetException - thrown when the store cannot be initiated.public GadgetAdminData getGadgetAdminData(String container, String gadgetUrl)
GadgetAdminStoregetGadgetAdminData in interface GadgetAdminStorecontainer - the container id.gadgetUrl - the gadget URL.public void setGadgetAdminData(String container, String gadgetUrl, GadgetAdminData adminData)
GadgetAdminStoresetGadgetAdminData in interface GadgetAdminStorecontainer - the container id.gadgetUrl - the gadget URL.adminData - administration data.public ContainerAdminData getContainerAdminData(String container)
GadgetAdminStoregetContainerAdminData in interface GadgetAdminStorecontainer - the container to get the administration data for.public void setContainerAdminData(String container, ContainerAdminData containerAdminData)
GadgetAdminStoresetContainerAdminData in interface GadgetAdminStorecontainer - the container to set the administration data for.containerAdminData - the container administration data.public ServerAdminData getServerAdminData()
GadgetAdminStoregetServerAdminData in interface GadgetAdminStorepublic boolean checkFeatureAdminInfo(Gadget gadget)
GadgetAdminStorecheckFeatureAdminInfo in interface GadgetAdminStoregadget - The gadget to check.public boolean isAllowedFeature(Feature feature, Gadget gadget)
GadgetAdminStoreisAllowedFeature in interface GadgetAdminStorefeature - The feature to check.gadget - The gadget to check.public boolean isWhitelisted(String container, String gadgetUrl)
GadgetAdminStoreisWhitelisted in interface GadgetAdminStorecontainer - The container id.gadgetUrl - The gadget URL.public Set<String> getAdditionalRpcServiceIds(Gadget gadget)
GadgetAdminStoregetAdditionalRpcServiceIds in interface GadgetAdminStoregadget - The gadget to get the IDs for.Copyright © 2007-2014 The Apache Software Foundation. All Rights Reserved.