Class ResourceAdminServiceClient
- java.lang.Object
-
- org.wso2.am.admin.clients.registry.ResourceAdminServiceClient
-
public class ResourceAdminServiceClient extends Object
-
-
Constructor Summary
Constructors Constructor Description ResourceAdminServiceClient(String serviceUrl, String sessionCookie)ResourceAdminServiceClient(String backEndUrl, String userName, String password)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringaddCollection(String parentPath, String collectionName, String mediaType, String description)booleanaddExtension(String name, DataHandler content)voidaddPolicy(String description, DataHandler dh)booleanaddResource(String destinationPath, String mediaType, String description, DataHandler dh)voidaddResourcePermission(String pathToAuthorize, String roleToAuthorize, String actionToAuthorize, String permissionType)voidaddSchema(String description, DataHandler dh)voidaddSymbolicLink(String parentPath, String name, String targetPath)voidaddTextResource(String parentPath, String fileName, String mediaType, String description, String content)voidaddWADL(String description, DataHandler dh)voidaddWSDL(String description, DataHandler dh)voidcopyResource(String parentPath, String oldResourcePath, String destinationPath, String targetName)voidcreateVersion(String resourcePath)booleandeleteResource(String destinationPath)voiddeleteVersionHistory(String path, String snapshotID)org.wso2.carbon.registry.resource.stub.beans.xsd.CollectionContentBeangetCollectionContent(String destinationPath)org.wso2.carbon.registry.resource.stub.beans.xsd.ContentDownloadBeangetContentDownloadBean(String path)StringgetHumanReadableMediaTypes()org.wso2.carbon.registry.resource.stub.beans.xsd.MetadataBeangetMetadata(String resourcePath)StringgetMimeTypeFromHuman(String mediaType)org.wso2.carbon.registry.resource.stub.beans.xsd.PermissionBeangetPermission(String path)StringgetProperty(String resourcePath, String key)org.wso2.carbon.registry.resource.stub.common.xsd.ResourceData[]getResource(String destinationPath)org.wso2.carbon.registry.resource.stub.beans.xsd.ContentBeangetResourceContent(String resourcePath)org.wso2.carbon.registry.resource.stub.common.xsd.ResourceData[]getResourceData(String resourcePath)org.wso2.carbon.registry.resource.stub.beans.xsd.ResourceTreeEntryBeangetResourceTreeEntryBean(String resourcePath)StringgetTextContent(String path)org.wso2.carbon.registry.resource.stub.beans.xsd.VersionPath[]getVersionPaths(String path)org.wso2.carbon.registry.resource.stub.beans.xsd.VersionsBeangetVersionsBean(String path)String[]listExtensions()voidmoveResource(String parentPath, String oldResourcePath, String destinationPath, String targetName)booleanremoveExtension(String name)voidrenameResource(String parentPath, String oldResourcePath, String newResourceName)booleanrestoreVersion(String path)voidsetDescription(String path, String description)voidupdateTextContent(String path, String content)voiduploadArtifact(String description, DataHandler dh)
-
-
-
Method Detail
-
addResource
public boolean addResource(String destinationPath, String mediaType, String description, DataHandler dh) throws org.wso2.carbon.registry.resource.stub.ResourceAdminServiceExceptionException, RemoteException
- Throws:
org.wso2.carbon.registry.resource.stub.ResourceAdminServiceExceptionExceptionRemoteException
-
getResource
public org.wso2.carbon.registry.resource.stub.common.xsd.ResourceData[] getResource(String destinationPath) throws org.wso2.carbon.registry.resource.stub.ResourceAdminServiceExceptionException, RemoteException
- Throws:
org.wso2.carbon.registry.resource.stub.ResourceAdminServiceExceptionExceptionRemoteException
-
getCollectionContent
public org.wso2.carbon.registry.resource.stub.beans.xsd.CollectionContentBean getCollectionContent(String destinationPath) throws RemoteException, org.wso2.carbon.registry.resource.stub.ResourceAdminServiceExceptionException
- Throws:
RemoteExceptionorg.wso2.carbon.registry.resource.stub.ResourceAdminServiceExceptionException
-
deleteResource
public boolean deleteResource(String destinationPath) throws org.wso2.carbon.registry.resource.stub.ResourceAdminServiceExceptionException, RemoteException
- Throws:
org.wso2.carbon.registry.resource.stub.ResourceAdminServiceExceptionExceptionRemoteException
-
addWSDL
public void addWSDL(String description, DataHandler dh) throws org.wso2.carbon.registry.resource.stub.ResourceAdminServiceExceptionException, RemoteException
- Throws:
org.wso2.carbon.registry.resource.stub.ResourceAdminServiceExceptionExceptionRemoteException
-
addWADL
public void addWADL(String description, DataHandler dh) throws org.wso2.carbon.registry.resource.stub.ResourceAdminServiceExceptionException, RemoteException
- Throws:
org.wso2.carbon.registry.resource.stub.ResourceAdminServiceExceptionExceptionRemoteException
-
addSchema
public void addSchema(String description, DataHandler dh) throws org.wso2.carbon.registry.resource.stub.ResourceAdminServiceExceptionException, RemoteException
- Throws:
org.wso2.carbon.registry.resource.stub.ResourceAdminServiceExceptionExceptionRemoteException
-
addPolicy
public void addPolicy(String description, DataHandler dh) throws org.wso2.carbon.registry.resource.stub.ResourceAdminServiceExceptionException, RemoteException
- Throws:
org.wso2.carbon.registry.resource.stub.ResourceAdminServiceExceptionExceptionRemoteException
-
uploadArtifact
public void uploadArtifact(String description, DataHandler dh) throws org.wso2.carbon.registry.resource.stub.ResourceAdminServiceExceptionException, RemoteException
- Throws:
org.wso2.carbon.registry.resource.stub.ResourceAdminServiceExceptionExceptionRemoteException
-
addCollection
public String addCollection(String parentPath, String collectionName, String mediaType, String description) throws org.wso2.carbon.registry.resource.stub.ResourceAdminServiceExceptionException, RemoteException
- Throws:
org.wso2.carbon.registry.resource.stub.ResourceAdminServiceExceptionExceptionRemoteException
-
addSymbolicLink
public void addSymbolicLink(String parentPath, String name, String targetPath) throws org.wso2.carbon.registry.resource.stub.ResourceAdminServiceExceptionException, RemoteException
- Throws:
org.wso2.carbon.registry.resource.stub.ResourceAdminServiceExceptionExceptionRemoteException
-
addTextResource
public void addTextResource(String parentPath, String fileName, String mediaType, String description, String content) throws RemoteException, org.wso2.carbon.registry.resource.stub.ResourceAdminServiceExceptionException
- Throws:
RemoteExceptionorg.wso2.carbon.registry.resource.stub.ResourceAdminServiceExceptionException
-
addResourcePermission
public void addResourcePermission(String pathToAuthorize, String roleToAuthorize, String actionToAuthorize, String permissionType) throws RemoteException, org.wso2.carbon.registry.resource.stub.ResourceAdminServiceResourceServiceExceptionException
- Throws:
RemoteExceptionorg.wso2.carbon.registry.resource.stub.ResourceAdminServiceResourceServiceExceptionException
-
getProperty
public String getProperty(String resourcePath, String key) throws RemoteException, org.wso2.carbon.registry.resource.stub.ResourceAdminServiceExceptionException
- Throws:
RemoteExceptionorg.wso2.carbon.registry.resource.stub.ResourceAdminServiceExceptionException
-
getMetadata
public org.wso2.carbon.registry.resource.stub.beans.xsd.MetadataBean getMetadata(String resourcePath) throws RemoteException, org.wso2.carbon.registry.resource.stub.ResourceAdminServiceExceptionException
- Throws:
RemoteExceptionorg.wso2.carbon.registry.resource.stub.ResourceAdminServiceExceptionException
-
getResourceContent
public org.wso2.carbon.registry.resource.stub.beans.xsd.ContentBean getResourceContent(String resourcePath) throws RemoteException, org.wso2.carbon.registry.resource.stub.ResourceAdminServiceExceptionException
- Throws:
RemoteExceptionorg.wso2.carbon.registry.resource.stub.ResourceAdminServiceExceptionException
-
getResourceData
public org.wso2.carbon.registry.resource.stub.common.xsd.ResourceData[] getResourceData(String resourcePath) throws RemoteException, org.wso2.carbon.registry.resource.stub.ResourceAdminServiceExceptionException
- Throws:
RemoteExceptionorg.wso2.carbon.registry.resource.stub.ResourceAdminServiceExceptionException
-
getHumanReadableMediaTypes
public String getHumanReadableMediaTypes() throws Exception
- Throws:
Exception
-
getMimeTypeFromHuman
public String getMimeTypeFromHuman(String mediaType) throws Exception
- Throws:
Exception
-
updateTextContent
public void updateTextContent(String path, String content) throws RemoteException, org.wso2.carbon.registry.resource.stub.ResourceAdminServiceExceptionException
- Throws:
RemoteExceptionorg.wso2.carbon.registry.resource.stub.ResourceAdminServiceExceptionException
-
copyResource
public void copyResource(String parentPath, String oldResourcePath, String destinationPath, String targetName) throws RemoteException, org.wso2.carbon.registry.resource.stub.ResourceAdminServiceExceptionException
- Throws:
RemoteExceptionorg.wso2.carbon.registry.resource.stub.ResourceAdminServiceExceptionException
-
moveResource
public void moveResource(String parentPath, String oldResourcePath, String destinationPath, String targetName) throws RemoteException, org.wso2.carbon.registry.resource.stub.ResourceAdminServiceExceptionException
- Throws:
RemoteExceptionorg.wso2.carbon.registry.resource.stub.ResourceAdminServiceExceptionException
-
getVersionPaths
public org.wso2.carbon.registry.resource.stub.beans.xsd.VersionPath[] getVersionPaths(String path) throws RemoteException, org.wso2.carbon.registry.resource.stub.ResourceAdminServiceExceptionException
- Throws:
RemoteExceptionorg.wso2.carbon.registry.resource.stub.ResourceAdminServiceExceptionException
-
getVersionsBean
public org.wso2.carbon.registry.resource.stub.beans.xsd.VersionsBean getVersionsBean(String path) throws RemoteException, org.wso2.carbon.registry.resource.stub.ResourceAdminServiceExceptionException
- Throws:
RemoteExceptionorg.wso2.carbon.registry.resource.stub.ResourceAdminServiceExceptionException
-
createVersion
public void createVersion(String resourcePath) throws RemoteException, org.wso2.carbon.registry.resource.stub.ResourceAdminServiceExceptionException
- Throws:
RemoteExceptionorg.wso2.carbon.registry.resource.stub.ResourceAdminServiceExceptionException
-
deleteVersionHistory
public void deleteVersionHistory(String path, String snapshotID) throws RemoteException, org.wso2.carbon.registry.resource.stub.ResourceAdminServiceExceptionException
- Throws:
RemoteExceptionorg.wso2.carbon.registry.resource.stub.ResourceAdminServiceExceptionException
-
restoreVersion
public boolean restoreVersion(String path) throws RemoteException, org.wso2.carbon.registry.resource.stub.ResourceAdminServiceExceptionException
- Throws:
RemoteExceptionorg.wso2.carbon.registry.resource.stub.ResourceAdminServiceExceptionException
-
getTextContent
public String getTextContent(String path) throws RemoteException, org.wso2.carbon.registry.resource.stub.ResourceAdminServiceExceptionException
- Throws:
RemoteExceptionorg.wso2.carbon.registry.resource.stub.ResourceAdminServiceExceptionException
-
getPermission
public org.wso2.carbon.registry.resource.stub.beans.xsd.PermissionBean getPermission(String path) throws Exception
- Throws:
Exception
-
renameResource
public void renameResource(String parentPath, String oldResourcePath, String newResourceName) throws RemoteException, org.wso2.carbon.registry.resource.stub.ResourceAdminServiceExceptionException
- Throws:
RemoteExceptionorg.wso2.carbon.registry.resource.stub.ResourceAdminServiceExceptionException
-
addExtension
public boolean addExtension(String name, DataHandler content) throws RemoteException, org.wso2.carbon.registry.resource.stub.ResourceAdminServiceExceptionException
- Throws:
RemoteExceptionorg.wso2.carbon.registry.resource.stub.ResourceAdminServiceExceptionException
-
removeExtension
public boolean removeExtension(String name) throws RemoteException, org.wso2.carbon.registry.resource.stub.ResourceAdminServiceExceptionException
- Throws:
RemoteExceptionorg.wso2.carbon.registry.resource.stub.ResourceAdminServiceExceptionException
-
listExtensions
public String[] listExtensions() throws RemoteException, org.wso2.carbon.registry.resource.stub.ResourceAdminServiceExceptionException
- Throws:
RemoteExceptionorg.wso2.carbon.registry.resource.stub.ResourceAdminServiceExceptionException
-
setDescription
public void setDescription(String path, String description) throws RemoteException, org.wso2.carbon.registry.info.stub.RegistryExceptionException
- Throws:
RemoteExceptionorg.wso2.carbon.registry.info.stub.RegistryExceptionException
-
getContentDownloadBean
public org.wso2.carbon.registry.resource.stub.beans.xsd.ContentDownloadBean getContentDownloadBean(String path) throws RemoteException, org.wso2.carbon.registry.info.stub.RegistryExceptionException
- Throws:
RemoteExceptionorg.wso2.carbon.registry.info.stub.RegistryExceptionException
-
getResourceTreeEntryBean
public org.wso2.carbon.registry.resource.stub.beans.xsd.ResourceTreeEntryBean getResourceTreeEntryBean(String resourcePath) throws RemoteException, org.wso2.carbon.registry.info.stub.RegistryExceptionException
- Throws:
RemoteExceptionorg.wso2.carbon.registry.info.stub.RegistryExceptionException
-
-