mirror of
https://repository.entgra.net/community/device-mgt-core.git
synced 2025-10-06 02:01:45 +00:00
Changes according maven check style plugin
This commit is contained in:
parent
b32c59b840
commit
300e7a710e
@ -214,7 +214,7 @@ public interface ApplicationManagementAPI {
|
|||||||
name = "isWithImages",
|
name = "isWithImages",
|
||||||
value = "Whether to return application with images",
|
value = "Whether to return application with images",
|
||||||
required = false)
|
required = false)
|
||||||
@QueryParam("isWithImages") Boolean IsWithImages
|
@QueryParam("isWithImages") Boolean isWithImages
|
||||||
);
|
);
|
||||||
|
|
||||||
@PUT
|
@PUT
|
||||||
|
|||||||
@ -32,7 +32,6 @@ import org.apache.cxf.jaxrs.ext.multipart.Attachment;
|
|||||||
import org.apache.cxf.jaxrs.ext.multipart.Multipart;
|
import org.apache.cxf.jaxrs.ext.multipart.Multipart;
|
||||||
import org.wso2.carbon.apimgt.annotations.api.Scopes;
|
import org.wso2.carbon.apimgt.annotations.api.Scopes;
|
||||||
import org.wso2.carbon.device.application.mgt.api.beans.ErrorResponse;
|
import org.wso2.carbon.device.application.mgt.api.beans.ErrorResponse;
|
||||||
import org.wso2.carbon.device.application.mgt.common.ApplicationRelease;
|
|
||||||
import org.wso2.carbon.device.application.mgt.common.Platform;
|
import org.wso2.carbon.device.application.mgt.common.Platform;
|
||||||
|
|
||||||
import javax.validation.constraints.Size;
|
import javax.validation.constraints.Size;
|
||||||
@ -211,7 +210,7 @@ public interface PlatformManagementAPI {
|
|||||||
response = ErrorResponse.class)
|
response = ErrorResponse.class)
|
||||||
})
|
})
|
||||||
Response addPlatform(
|
Response addPlatform(
|
||||||
@Multipart(value = "Platform", type = "application/json" ) Platform platform,
|
@Multipart(value = "Platform", type = "application/json") Platform platform,
|
||||||
@Multipart(value = "icon", required = false) Attachment iconFile
|
@Multipart(value = "icon", required = false) Attachment iconFile
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -371,7 +370,7 @@ public interface PlatformManagementAPI {
|
|||||||
response = ErrorResponse.class)
|
response = ErrorResponse.class)
|
||||||
})
|
})
|
||||||
Response getPlatformTags(
|
Response getPlatformTags(
|
||||||
@ApiParam(name = "name", value ="The initial part of the name of platform tags that we need to retrieve",
|
@ApiParam(name = "name", value = "The initial part of the name of platform tags that we need to retrieve",
|
||||||
required = true)
|
required = true)
|
||||||
@PathParam("name") @Size(min = 3) String name
|
@PathParam("name") @Size(min = 3) String name
|
||||||
);
|
);
|
||||||
|
|||||||
@ -217,8 +217,8 @@ public class ApplicationManagementAPIImpl implements ApplicationManagementAPI {
|
|||||||
@POST
|
@POST
|
||||||
@Path("/upload-image-artifacts/{uuid}")
|
@Path("/upload-image-artifacts/{uuid}")
|
||||||
public Response uploadApplicationArtifacts(@PathParam("uuid") String applicationUUID,
|
public Response uploadApplicationArtifacts(@PathParam("uuid") String applicationUUID,
|
||||||
@Multipart("icon") Attachment iconFile, @Multipart("banner") Attachment bannerFile, @Multipart
|
@Multipart("icon") Attachment iconFile, @Multipart("banner") Attachment bannerFile,
|
||||||
("screenshot") List<Attachment> attachmentList) {
|
@Multipart("screenshot") List<Attachment> attachmentList) {
|
||||||
ApplicationStorageManager applicationStorageManager = APIUtil.getApplicationStorageManager();
|
ApplicationStorageManager applicationStorageManager = APIUtil.getApplicationStorageManager();
|
||||||
try {
|
try {
|
||||||
InputStream iconFileStream;
|
InputStream iconFileStream;
|
||||||
|
|||||||
@ -21,7 +21,6 @@ package org.wso2.carbon.device.application.mgt.common;
|
|||||||
|
|
||||||
import org.wso2.carbon.device.application.mgt.common.jaxrs.Exclude;
|
import org.wso2.carbon.device.application.mgt.common.jaxrs.Exclude;
|
||||||
|
|
||||||
import java.awt.*;
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|||||||
@ -27,46 +27,48 @@ import java.util.List;
|
|||||||
* ApplicationReleaseManager is responsible for handling all the operations related with
|
* ApplicationReleaseManager is responsible for handling all the operations related with
|
||||||
* {@link org.wso2.carbon.device.application.mgt.common.ApplicationRelease} which involving addition, updating ,
|
* {@link org.wso2.carbon.device.application.mgt.common.ApplicationRelease} which involving addition, updating ,
|
||||||
* deletion and viewing.
|
* deletion and viewing.
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
public interface ApplicationReleaseManager {
|
public interface ApplicationReleaseManager {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* To create an application release for an Application.
|
* To create an application release for an Application.
|
||||||
*
|
*
|
||||||
* @param appicationUuid UUID of the Application
|
* @param appicationUuid UUID of the Application
|
||||||
* @param applicationRelease ApplicatonRelease that need to be be created.
|
* @param applicationRelease ApplicatonRelease that need to be be created.
|
||||||
* @return the unique id of the application release, if the application release succeeded else -1
|
* @return the unique id of the application release, if the application release succeeded else -1
|
||||||
*/
|
*/
|
||||||
public ApplicationRelease createRelease(String appicationUuid, ApplicationRelease applicationRelease) throws
|
ApplicationRelease createRelease(String appicationUuid, ApplicationRelease applicationRelease)
|
||||||
ApplicationManagementException;
|
throws ApplicationManagementException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* To get the application release of the Application/
|
* To get the application release of the Application/
|
||||||
|
*
|
||||||
* @param applicationUuid UUID of the Application.
|
* @param applicationUuid UUID of the Application.
|
||||||
* @param version Version of the ApplicationRelease that need to be retrieved.
|
* @param version Version of the ApplicationRelease that need to be retrieved.
|
||||||
* @return ApplicationRelease related with particular Application UUID and version.
|
* @return ApplicationRelease related with particular Application UUID and version.
|
||||||
* @throws ApplicationManagementException ApplicationManagementException
|
* @throws ApplicationManagementException ApplicationManagementException
|
||||||
*/
|
*/
|
||||||
public ApplicationRelease getRelease(String applicationUuid, String version) throws ApplicationManagementException;
|
ApplicationRelease getRelease(String applicationUuid, String version) throws ApplicationManagementException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* To get all the releases of a particular Application.
|
* To get all the releases of a particular Application.
|
||||||
|
*
|
||||||
* @param applicationUuid UUID of the Application to get all the releases.
|
* @param applicationUuid UUID of the Application to get all the releases.
|
||||||
* @return the List of the Application releases related with the particular Application.
|
* @return the List of the Application releases related with the particular Application.
|
||||||
* @throws ApplicationManagementException Application Management Exception.
|
* @throws ApplicationManagementException Application Management Exception.
|
||||||
*/
|
*/
|
||||||
public List<ApplicationRelease> getReleases(String applicationUuid) throws ApplicationManagementException;
|
List<ApplicationRelease> getReleases(String applicationUuid) throws ApplicationManagementException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* To make a particular application release as the default / not default-one
|
* To make a particular application release as the default / not default-one
|
||||||
* @param uuid UUID of the application
|
*
|
||||||
* @param version Version of the application
|
* @param uuid UUID of the application
|
||||||
* @param isDefault is default or not.
|
* @param version Version of the application
|
||||||
|
* @param isDefault is default or not.
|
||||||
* @param releaseChannel Release channel to make the
|
* @param releaseChannel Release channel to make the
|
||||||
* @throws ApplicationManagementException Application Management Exception.
|
* @throws ApplicationManagementException Application Management Exception.
|
||||||
*/
|
*/
|
||||||
public void changeDefaultRelease(String uuid, String version, boolean isDefault, String releaseChannel)
|
void changeDefaultRelease(String uuid, String version, boolean isDefault, String releaseChannel)
|
||||||
throws ApplicationManagementException;
|
throws ApplicationManagementException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -77,8 +79,8 @@ public interface ApplicationReleaseManager {
|
|||||||
* @return Updated Application Release.
|
* @return Updated Application Release.
|
||||||
* @throws ApplicationManagementException Application Management Exception.
|
* @throws ApplicationManagementException Application Management Exception.
|
||||||
*/
|
*/
|
||||||
public ApplicationRelease updateRelease(String applicationUuid, ApplicationRelease applicationRelease) throws
|
ApplicationRelease updateRelease(String applicationUuid, ApplicationRelease applicationRelease)
|
||||||
ApplicationManagementException;
|
throws ApplicationManagementException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* To delete a particular release
|
* To delete a particular release
|
||||||
@ -87,7 +89,7 @@ public interface ApplicationReleaseManager {
|
|||||||
* @param version Version of the ApplicationRelease that need to be deleted.
|
* @param version Version of the ApplicationRelease that need to be deleted.
|
||||||
* @throws ApplicationManagementException Application Management Exception.
|
* @throws ApplicationManagementException Application Management Exception.
|
||||||
*/
|
*/
|
||||||
public void deleteApplicationRelease(String applicationUuid, String version) throws ApplicationManagementException;
|
void deleteApplicationRelease(String applicationUuid, String version) throws ApplicationManagementException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* To delete all the application releases related with the the particular application.
|
* To delete all the application releases related with the the particular application.
|
||||||
@ -95,5 +97,5 @@ public interface ApplicationReleaseManager {
|
|||||||
* @param applicationUuid UUID of the application.
|
* @param applicationUuid UUID of the application.
|
||||||
* @throws ApplicationManagementException Application Management Exception.
|
* @throws ApplicationManagementException Application Management Exception.
|
||||||
*/
|
*/
|
||||||
public void deleteApplicationReleases(String applicationUuid) throws ApplicationManagementException;
|
void deleteApplicationReleases(String applicationUuid) throws ApplicationManagementException;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -36,37 +36,40 @@ public interface ApplicationStorageManager {
|
|||||||
* @param applicationUUID UUID of the application
|
* @param applicationUUID UUID of the application
|
||||||
* @param iconFile Icon File input stream
|
* @param iconFile Icon File input stream
|
||||||
* @param bannerFile Banner File input stream
|
* @param bannerFile Banner File input stream
|
||||||
* @throws ApplicationStorageManagementException Application Storage Management Exception.
|
* @throws ResourceManagementException Resource Management Exception.
|
||||||
*/
|
*/
|
||||||
public void uploadImageArtifacts(String applicationUUID, InputStream iconFile, InputStream bannerFile,
|
void uploadImageArtifacts(String applicationUUID, InputStream iconFile, InputStream bannerFile,
|
||||||
List<InputStream> screenshots) throws ResourceManagementException;
|
List<InputStream> screenshots) throws ResourceManagementException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* To upload release artifacts for an Application.
|
* To upload release artifacts for an Application.
|
||||||
|
*
|
||||||
* @param applicationUUID UUID of the application related with the release.
|
* @param applicationUUID UUID of the application related with the release.
|
||||||
* @param versionName Name of version of the Applcation Release.
|
* @param versionName Name of version of the Applcation Release.
|
||||||
* @param binaryFile Binary File for the release.
|
* @param binaryFile Binary File for the release.
|
||||||
* @throws ApplicationStorageManagementException Application Storage Management Exception.
|
* @throws ResourceManagementException Resource Management Exception.
|
||||||
*/
|
*/
|
||||||
public void uploadReleaseArtifacts(String applicationUUID, String versionName, InputStream binaryFile)
|
void uploadReleaseArtifacts(String applicationUUID, String versionName, InputStream binaryFile)
|
||||||
throws ResourceManagementException;
|
throws ResourceManagementException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* To get released artifacts for the particular version of the application.
|
* To get released artifacts for the particular version of the application.
|
||||||
|
*
|
||||||
* @param applicationUUID UUID of the Application
|
* @param applicationUUID UUID of the Application
|
||||||
* @param versionName Version of the release to be retrieved
|
* @param versionName Version of the release to be retrieved
|
||||||
* @return the artifact related with the Application Release.
|
* @return the artifact related with the Application Release.
|
||||||
* @throws ApplicationStorageManagementException Application Storage Management Exception.
|
* @throws ApplicationStorageManagementException Application Storage Management Exception.
|
||||||
*/
|
*/
|
||||||
public InputStream getReleasedArtifacts(String applicationUUID, String versionName) throws
|
InputStream getReleasedArtifacts(String applicationUUID, String versionName)
|
||||||
ApplicationStorageManagementException;
|
throws ApplicationStorageManagementException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* To delete all the artifacts related with a particular Application.
|
* To delete all the artifacts related with a particular Application.
|
||||||
|
*
|
||||||
* @param applicationUUID UUID of the Application.
|
* @param applicationUUID UUID of the Application.
|
||||||
* @throws ApplicationStorageManagementException Application Storage Management Exception.
|
* @throws ApplicationStorageManagementException Application Storage Management Exception.
|
||||||
*/
|
*/
|
||||||
public void deleteApplicationArtifacts(String applicationUUID) throws ApplicationStorageManagementException;
|
void deleteApplicationArtifacts(String applicationUUID) throws ApplicationStorageManagementException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* To delete the artifacts related with particular Application Release.
|
* To delete the artifacts related with particular Application Release.
|
||||||
@ -75,16 +78,16 @@ public interface ApplicationStorageManager {
|
|||||||
* @param version Version of ApplicationRelease that need to be deleted.
|
* @param version Version of ApplicationRelease that need to be deleted.
|
||||||
* @throws ApplicationStorageManagementException Application Storage Management Exception.
|
* @throws ApplicationStorageManagementException Application Storage Management Exception.
|
||||||
*/
|
*/
|
||||||
public void deleteApplicationReleaseArtifacts(String applicationUUID, String version)
|
void deleteApplicationReleaseArtifacts(String applicationUUID, String version)
|
||||||
throws ApplicationStorageManagementException;
|
throws ApplicationStorageManagementException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* To delete all release artifacts related with particular Application Release.
|
* To delete all release artifacts related with particular Application Release.
|
||||||
|
*
|
||||||
* @param applicationUUID UUID of the Application.
|
* @param applicationUUID UUID of the Application.
|
||||||
* @throws ApplicationStorageManagementException Application Storage Management Exception
|
* @throws ApplicationStorageManagementException Application Storage Management Exception
|
||||||
*/
|
*/
|
||||||
public void deleteAllApplicationReleaseArtifacts(String applicationUUID) throws
|
void deleteAllApplicationReleaseArtifacts(String applicationUUID) throws ApplicationStorageManagementException;
|
||||||
ApplicationStorageManagementException;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* To get particular image artifact of the application.
|
* To get particular image artifact of the application.
|
||||||
@ -95,6 +98,6 @@ public interface ApplicationStorageManager {
|
|||||||
* @return the relevant image artifact.
|
* @return the relevant image artifact.
|
||||||
* @throws ApplicationStorageManagementException Application Storage Management Exception.
|
* @throws ApplicationStorageManagementException Application Storage Management Exception.
|
||||||
*/
|
*/
|
||||||
public ImageArtifact getImageArtifact(String applicationUUID, String name, int count) throws
|
ImageArtifact getImageArtifact(String applicationUUID, String name, int count)
|
||||||
ApplicationStorageManagementException;
|
throws ApplicationStorageManagementException;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -19,8 +19,6 @@
|
|||||||
package org.wso2.carbon.device.application.mgt.common.services;
|
package org.wso2.carbon.device.application.mgt.common.services;
|
||||||
|
|
||||||
import org.wso2.carbon.device.application.mgt.common.Category;
|
import org.wso2.carbon.device.application.mgt.common.Category;
|
||||||
import org.wso2.carbon.device.application.mgt.common.Filter;
|
|
||||||
import org.wso2.carbon.device.application.mgt.common.exception.ApplicationCategoryManagementException;
|
|
||||||
import org.wso2.carbon.device.application.mgt.common.exception.ApplicationManagementException;
|
import org.wso2.carbon.device.application.mgt.common.exception.ApplicationManagementException;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|||||||
@ -35,7 +35,7 @@ public interface PlatformManager {
|
|||||||
* @param tenantId ID of the tenant
|
* @param tenantId ID of the tenant
|
||||||
* @throws PlatformManagementException Platform Management Exception
|
* @throws PlatformManagementException Platform Management Exception
|
||||||
*/
|
*/
|
||||||
public void initialize(int tenantId) throws PlatformManagementException;
|
void initialize(int tenantId) throws PlatformManagementException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* To get platforms of the specific tenant.
|
* To get platforms of the specific tenant.
|
||||||
@ -44,7 +44,7 @@ public interface PlatformManager {
|
|||||||
* @return List of platforms
|
* @return List of platforms
|
||||||
* @throws PlatformManagementException Platform Management Exception
|
* @throws PlatformManagementException Platform Management Exception
|
||||||
*/
|
*/
|
||||||
public List<Platform> getPlatforms(int tenantId) throws PlatformManagementException;
|
List<Platform> getPlatforms(int tenantId) throws PlatformManagementException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* To get platform with the given platform identifier and tenant ID.
|
* To get platform with the given platform identifier and tenant ID.
|
||||||
@ -54,7 +54,7 @@ public interface PlatformManager {
|
|||||||
* @return the Specific platform with the platform identifier and tenant
|
* @return the Specific platform with the platform identifier and tenant
|
||||||
* @throws PlatformManagementException Platform Management Exception
|
* @throws PlatformManagementException Platform Management Exception
|
||||||
*/
|
*/
|
||||||
public Platform getPlatform(int tenantId, String platformIdentifier) throws PlatformManagementException;
|
Platform getPlatform(int tenantId, String platformIdentifier) throws PlatformManagementException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* To register a platform under particular tenant.
|
* To register a platform under particular tenant.
|
||||||
@ -63,7 +63,7 @@ public interface PlatformManager {
|
|||||||
* @param platform Platform to be registered
|
* @param platform Platform to be registered
|
||||||
* @throws PlatformManagementException Platform Management Exception
|
* @throws PlatformManagementException Platform Management Exception
|
||||||
*/
|
*/
|
||||||
public void register(int tenantId, Platform platform) throws PlatformManagementException;
|
void register(int tenantId, Platform platform) throws PlatformManagementException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* To update a platform.
|
* To update a platform.
|
||||||
@ -73,8 +73,7 @@ public interface PlatformManager {
|
|||||||
* @param platform Platform to be updated
|
* @param platform Platform to be updated
|
||||||
* @throws PlatformManagementException Platform Management Exception
|
* @throws PlatformManagementException Platform Management Exception
|
||||||
*/
|
*/
|
||||||
public void update(int tenantId, String oldPlatformIdentifier, Platform platform)
|
void update(int tenantId, String oldPlatformIdentifier, Platform platform) throws PlatformManagementException;
|
||||||
throws PlatformManagementException;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* To un-register the platform.
|
* To un-register the platform.
|
||||||
@ -84,8 +83,7 @@ public interface PlatformManager {
|
|||||||
* @param isFileBased To indicate whether a file based or not.
|
* @param isFileBased To indicate whether a file based or not.
|
||||||
* @throws PlatformManagementException Platform Management Exception.
|
* @throws PlatformManagementException Platform Management Exception.
|
||||||
*/
|
*/
|
||||||
public void unregister(int tenantId, String platformIdentifier, boolean isFileBased)
|
void unregister(int tenantId, String platformIdentifier, boolean isFileBased) throws PlatformManagementException;
|
||||||
throws PlatformManagementException;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* To add mapping to platform identifiers with the tenant ID.
|
* To add mapping to platform identifiers with the tenant ID.
|
||||||
@ -94,7 +92,7 @@ public interface PlatformManager {
|
|||||||
* @param platformIdentifiers Platform Identifiers
|
* @param platformIdentifiers Platform Identifiers
|
||||||
* @throws PlatformManagementException Platform Management Exception
|
* @throws PlatformManagementException Platform Management Exception
|
||||||
*/
|
*/
|
||||||
public void addMapping(int tenantId, List<String> platformIdentifiers) throws PlatformManagementException;
|
void addMapping(int tenantId, List<String> platformIdentifiers) throws PlatformManagementException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* To add mapping to a platform for a tenant.
|
* To add mapping to a platform for a tenant.
|
||||||
@ -103,7 +101,7 @@ public interface PlatformManager {
|
|||||||
* @param platformIdentifier ID of the platform, the mapping should be added.
|
* @param platformIdentifier ID of the platform, the mapping should be added.
|
||||||
* @throws PlatformManagementException Platform Management Exception.
|
* @throws PlatformManagementException Platform Management Exception.
|
||||||
*/
|
*/
|
||||||
public void addMapping(int tenantId, String platformIdentifier) throws PlatformManagementException;
|
void addMapping(int tenantId, String platformIdentifier) throws PlatformManagementException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* To remove a mapping of a platform to a tenant.
|
* To remove a mapping of a platform to a tenant.
|
||||||
@ -112,7 +110,7 @@ public interface PlatformManager {
|
|||||||
* @param platformIdentifier ID of the platform.
|
* @param platformIdentifier ID of the platform.
|
||||||
* @throws PlatformManagementException Platform Management Exception.
|
* @throws PlatformManagementException Platform Management Exception.
|
||||||
*/
|
*/
|
||||||
public void removeMapping(int tenantId, String platformIdentifier) throws PlatformManagementException;
|
void removeMapping(int tenantId, String platformIdentifier) throws PlatformManagementException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* To update the platform status(ENABLED / DISABLED).
|
* To update the platform status(ENABLED / DISABLED).
|
||||||
@ -122,7 +120,7 @@ public interface PlatformManager {
|
|||||||
* @param status Status to be updated.
|
* @param status Status to be updated.
|
||||||
* @throws PlatformManagementException Platform Management Exception.
|
* @throws PlatformManagementException Platform Management Exception.
|
||||||
*/
|
*/
|
||||||
public void updatePlatformStatus(int tenantId, String platformIdentifier, String status)
|
void updatePlatformStatus(int tenantId, String platformIdentifier, String status)
|
||||||
throws PlatformManagementException;
|
throws PlatformManagementException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -131,7 +129,7 @@ public interface PlatformManager {
|
|||||||
* @param tenantId ID of the tenant.
|
* @param tenantId ID of the tenant.
|
||||||
* @throws PlatformManagementException Platform Management Exception.
|
* @throws PlatformManagementException Platform Management Exception.
|
||||||
*/
|
*/
|
||||||
public void removePlatforms(int tenantId) throws PlatformManagementException;
|
void removePlatforms(int tenantId) throws PlatformManagementException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* To get the platform tags.
|
* To get the platform tags.
|
||||||
@ -140,5 +138,5 @@ public interface PlatformManager {
|
|||||||
* @return list of the platform tags that start with the character sequence.
|
* @return list of the platform tags that start with the character sequence.
|
||||||
* @throws PlatformManagementException PlatformManagement Exception
|
* @throws PlatformManagementException PlatformManagement Exception
|
||||||
*/
|
*/
|
||||||
public List<String> getPlatformTags(String name) throws PlatformManagementException;
|
List<String> getPlatformTags(String name) throws PlatformManagementException;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -33,18 +33,19 @@ public interface PlatformStorageManager {
|
|||||||
* To upload image artifacts related with an Application.
|
* To upload image artifacts related with an Application.
|
||||||
*
|
*
|
||||||
* @param platformIdentifier Identifier of the platform
|
* @param platformIdentifier Identifier of the platform
|
||||||
* @param iconFile Icon File input stream
|
* @param iconFile Icon File input stream
|
||||||
* @throws PlatformStorageManagementException Platform Storage Management Exception.
|
* @throws ResourceManagementException Resource Management Exception.
|
||||||
*/
|
*/
|
||||||
public void uploadIcon(String platformIdentifier, InputStream iconFile) throws ResourceManagementException;
|
void uploadIcon(String platformIdentifier, InputStream iconFile) throws ResourceManagementException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* To get the icon for a particular platform.
|
* To get the icon for a particular platform.
|
||||||
*
|
*
|
||||||
* @param platformIdentifier Identifier of the platform.
|
* @param platformIdentifier Identifier of the platform.
|
||||||
* @return the icon for the given platform.
|
* @return the icon for the given platform.
|
||||||
|
* @throws PlatformStorageManagementException Platform Storage Management Exception.
|
||||||
*/
|
*/
|
||||||
public ImageArtifact getIcon(String platformIdentifier) throws PlatformStorageManagementException;
|
ImageArtifact getIcon(String platformIdentifier) throws PlatformStorageManagementException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* To delete the icon of a particular platform
|
* To delete the icon of a particular platform
|
||||||
@ -52,5 +53,5 @@ public interface PlatformStorageManager {
|
|||||||
* @param platformIdentifier Identifier of the platform to which delete icon.
|
* @param platformIdentifier Identifier of the platform to which delete icon.
|
||||||
* @throws PlatformStorageManagementException PlatformStorageManagement Exception.
|
* @throws PlatformStorageManagementException PlatformStorageManagement Exception.
|
||||||
*/
|
*/
|
||||||
public void deleteIcon(String platformIdentifier) throws PlatformStorageManagementException;
|
void deleteIcon(String platformIdentifier) throws PlatformStorageManagementException;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -36,8 +36,8 @@ import org.wso2.carbon.device.application.mgt.core.dao.impl.category.GenericCate
|
|||||||
import org.wso2.carbon.device.application.mgt.core.dao.impl.lifecyclestate.GenericLifecycleStateImpl;
|
import org.wso2.carbon.device.application.mgt.core.dao.impl.lifecyclestate.GenericLifecycleStateImpl;
|
||||||
import org.wso2.carbon.device.application.mgt.core.dao.impl.platform.GenericPlatformDAOImpl;
|
import org.wso2.carbon.device.application.mgt.core.dao.impl.platform.GenericPlatformDAOImpl;
|
||||||
import org.wso2.carbon.device.application.mgt.core.dao.impl.platform.OracleMsSQLPlatformDAOImpl;
|
import org.wso2.carbon.device.application.mgt.core.dao.impl.platform.OracleMsSQLPlatformDAOImpl;
|
||||||
import org.wso2.carbon.device.application.mgt.core.dao.impl.visibility.GenericVisibilityDAOImpl;
|
|
||||||
import org.wso2.carbon.device.application.mgt.core.dao.impl.subscription.GenericSubscriptionDAOImpl;
|
import org.wso2.carbon.device.application.mgt.core.dao.impl.subscription.GenericSubscriptionDAOImpl;
|
||||||
|
import org.wso2.carbon.device.application.mgt.core.dao.impl.visibility.GenericVisibilityDAOImpl;
|
||||||
import org.wso2.carbon.device.application.mgt.core.exception.ApplicationManagementDAOException;
|
import org.wso2.carbon.device.application.mgt.core.exception.ApplicationManagementDAOException;
|
||||||
import org.wso2.carbon.device.application.mgt.core.util.ApplicationMgtDatabaseCreator;
|
import org.wso2.carbon.device.application.mgt.core.util.ApplicationMgtDatabaseCreator;
|
||||||
import org.wso2.carbon.device.application.mgt.core.util.ConnectionManagerUtil;
|
import org.wso2.carbon.device.application.mgt.core.util.ConnectionManagerUtil;
|
||||||
|
|||||||
@ -90,8 +90,7 @@ public class GenericPlatformDAOImpl extends AbstractDAOImpl implements PlatformD
|
|||||||
|
|
||||||
if (isBatchExecutionSupported) {
|
if (isBatchExecutionSupported) {
|
||||||
preparedStatement.addBatch();
|
preparedStatement.addBatch();
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
preparedStatement.execute();
|
preparedStatement.execute();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -157,10 +157,10 @@ public class ApplicationStorageManagerImpl implements ApplicationStorageManager
|
|||||||
throws ResourceManagementException {
|
throws ResourceManagementException {
|
||||||
Application application = validateApplication(applicationUUID);
|
Application application = validateApplication(applicationUUID);
|
||||||
String artifactDirectoryPath = storagePath + application.getId();
|
String artifactDirectoryPath = storagePath + application.getId();
|
||||||
if (log.isDebugEnabled())
|
if (log.isDebugEnabled()) {
|
||||||
log.debug("Artifact Directory Path for saving the application release related artifacts related with "
|
log.debug("Artifact Directory Path for saving the application release related artifacts related with "
|
||||||
+ "application " + applicationUUID + " is " + artifactDirectoryPath);
|
+ "application " + applicationUUID + " is " + artifactDirectoryPath);
|
||||||
|
}
|
||||||
StorageManagementUtil.createArtifactDirectory(artifactDirectoryPath);
|
StorageManagementUtil.createArtifactDirectory(artifactDirectoryPath);
|
||||||
if (binaryFile != null) {
|
if (binaryFile != null) {
|
||||||
try {
|
try {
|
||||||
@ -171,7 +171,6 @@ public class ApplicationStorageManagerImpl implements ApplicationStorageManager
|
|||||||
+ applicationUUID, e);
|
+ applicationUUID, e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@ -21,7 +21,6 @@ package org.wso2.carbon.device.application.mgt.core.util;
|
|||||||
import org.apache.commons.codec.binary.Base64;
|
import org.apache.commons.codec.binary.Base64;
|
||||||
import org.apache.commons.io.IOUtils;
|
import org.apache.commons.io.IOUtils;
|
||||||
import org.wso2.carbon.device.application.mgt.common.ImageArtifact;
|
import org.wso2.carbon.device.application.mgt.common.ImageArtifact;
|
||||||
import org.wso2.carbon.device.application.mgt.common.exception.ApplicationStorageManagementException;
|
|
||||||
import org.wso2.carbon.device.application.mgt.common.exception.ResourceManagementException;
|
import org.wso2.carbon.device.application.mgt.common.exception.ResourceManagementException;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
@ -32,12 +31,15 @@ import java.io.InputStream;
|
|||||||
import java.io.OutputStream;
|
import java.io.OutputStream;
|
||||||
import java.nio.file.Files;
|
import java.nio.file.Files;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This is a util class that handles Storage Management related tasks.
|
||||||
|
*/
|
||||||
public class StorageManagementUtil {
|
public class StorageManagementUtil {
|
||||||
/**
|
/**
|
||||||
* This method is responsible for creating artifact parent directories in the given path.
|
* This method is responsible for creating artifact parent directories in the given path.
|
||||||
*
|
*
|
||||||
* @param artifactDirectoryPath Path for the artifact directory.
|
* @param artifactDirectoryPath Path for the artifact directory.
|
||||||
* @throws ApplicationStorageManagementException Application Storage Management Exception.
|
* @throws ResourceManagementException Resource Management Exception.
|
||||||
*/
|
*/
|
||||||
public static void createArtifactDirectory(String artifactDirectoryPath) throws ResourceManagementException {
|
public static void createArtifactDirectory(String artifactDirectoryPath) throws ResourceManagementException {
|
||||||
File artifactDirectory = new File(artifactDirectoryPath);
|
File artifactDirectory = new File(artifactDirectoryPath);
|
||||||
@ -65,7 +67,6 @@ public class StorageManagementUtil {
|
|||||||
artifactDirectory.delete();
|
artifactDirectory.delete();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* To save a file in a given location.
|
* To save a file in a given location.
|
||||||
*
|
*
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user