org.wso2.carbon.registry.admin.api.properties
Interface IPropertiesAdminService<PropertiesBean>

Type Parameters:
PropertiesBean - This bean contains a list of properties, for a given resource.

public interface IPropertiesAdminService<PropertiesBean>

Provides functionality to search inside resource content.


Method Summary
 PropertiesBean getProperties(String path, String viewProps)
          Method to return all the properties of a given resource.
 void removeProperty(String path, String name)
          Method to remove property.
 void setProperty(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.
 void updateProperty(String path, String name, String value, String oldName)
          Method to update a property (This removes the old property with the oldName)
 

Method Detail

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.

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.

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.


Copyright © 2011 WSO2 Inc. All Rights Reserved.