Interface IPropertiesAdminService<PropertiesBean,RetentionBean>
- Type Parameters:
PropertiesBean- This bean contains a list of properties, for a given resource.
public interface IPropertiesAdminService<PropertiesBean,RetentionBean>
Provides functionality to manage resource properties.
-
Method Summary
Modifier and TypeMethodDescriptiongetProperties(String path, String viewProps) Method to return all the properties of a given resource.getRetentionProperties(String path) Method to get resource retention properties of a given resourcevoidremoveProperty(String path, String name) Method to remove property.voidsetProperty(String path, String name, String value) Method to add a property, if there already exist a property with the same name, this will add the value to the existing property name.booleansetRetentionProperties(String path, RetentionBean bean) Method to set resource retention properties of a resourcevoidupdateProperty(String path, String name, String value, String oldName) Method to update a property (This removes the old property with the oldName)
-
Method Details
-
getProperties
PropertiesBean getProperties(String path, String viewProps) throws org.wso2.carbon.registry.core.exceptions.RegistryException Method to return all the properties of a given resource.- Parameters:
path- path of the resource.viewProps- currently supported values "true", "false". if "true" show system properties.- Returns:
- The properties bean.
- Throws:
org.wso2.carbon.registry.core.exceptions.RegistryException- throws if there is an error.
-
getRetentionProperties
RetentionBean getRetentionProperties(String path) throws org.wso2.carbon.registry.core.exceptions.RegistryException Method to get resource retention properties of a given resource- Parameters:
path- path of the resource- Returns:
- RetentionBean which encapsulates retention properties
- Throws:
org.wso2.carbon.registry.core.exceptions.RegistryException
-
setProperty
void setProperty(String path, String name, String value) throws org.wso2.carbon.registry.core.exceptions.RegistryException Method to add a property, if there already exist a property with the same name, this will add the value to the existing property name. (So please remove the old property with the same name before calling this method).- Parameters:
path- path of the resource.name- property name.value- property value.- Throws:
org.wso2.carbon.registry.core.exceptions.RegistryException- throws if there is an error.
-
setRetentionProperties
boolean setRetentionProperties(String path, RetentionBean bean) throws org.wso2.carbon.registry.core.exceptions.RegistryException Method to set resource retention properties of a resource- Parameters:
path- Path of the resourcebean- RetentionBean which encapsulates retention properties- Returns:
- true if operation succeeds false otherwise
- Throws:
org.wso2.carbon.registry.core.exceptions.RegistryException
-
updateProperty
void updateProperty(String path, String name, String value, String oldName) throws org.wso2.carbon.registry.core.exceptions.RegistryException Method to update a property (This removes the old property with the oldName)- Parameters:
path- path of the resource.name- property name.value- property value.oldName- old name of the property.- Throws:
org.wso2.carbon.registry.core.exceptions.RegistryException- throws if there is an error.
-
removeProperty
void removeProperty(String path, String name) throws org.wso2.carbon.registry.core.exceptions.RegistryException Method to remove property.- Parameters:
path- path of the resource.name- property name.- Throws:
org.wso2.carbon.registry.core.exceptions.RegistryException- throws if there is an error.
-