Search in sources :

Example 1 with ValidateStringParam

use of org.craftercms.commons.validation.annotations.param.ValidateStringParam in project studio by craftercms.

the class AwsS3ServiceImpl method listItems.

/**
 * {@inheritDoc}
 */
@Override
@HasPermission(type = DefaultPermission.class, action = "s3 read")
public List<S3Item> listItems(@ValidateStringParam(name = "siteId") @ProtectedResourceId("siteId") String siteId, @ValidateStringParam(name = "profileId") String profileId, @ValidateStringParam(name = "path") String path, @ValidateStringParam(name = "type") String type) throws AwsException {
    S3Profile profile = getProfile(siteId, profileId);
    AmazonS3 client = getS3Client(profile);
    List<S3Item> items = new LinkedList<>();
    Mimetypes mimetypes = Mimetypes.getInstance();
    MimeType filerType = StringUtils.isEmpty(type) || StringUtils.equals(type, ITEM_FILTER) ? MimeTypeUtils.ALL : new MimeType(type);
    String prefix = StringUtils.isEmpty(path) ? path : normalizePrefix(path);
    ListObjectsV2Request request = new ListObjectsV2Request().withBucketName(profile.getBucketName()).withPrefix(prefix).withDelimiter(delimiter);
    ListObjectsV2Result result;
    do {
        result = client.listObjectsV2(request);
        result.getCommonPrefixes().stream().map(p -> new S3Item(StringUtils.removeEnd(StringUtils.removeStart(p, prefix), delimiter), p, true)).forEach(items::add);
        result.getObjectSummaries().stream().filter(o -> !StringUtils.equals(o.getKey(), prefix) && MimeType.valueOf(mimetypes.getMimetype(o.getKey())).isCompatibleWith(filerType)).map(o -> new S3Item(StringUtils.removeStart(o.getKey(), prefix), createUrl(profileId, o.getKey()), false)).forEach(items::add);
        request.setContinuationToken(result.getNextContinuationToken());
    } while (result.isTruncated());
    return items;
}
Also used : S3Item(org.craftercms.studio.model.aws.s3.S3Item) AwsUtils(org.craftercms.studio.impl.v1.service.aws.AwsUtils) S3Item(org.craftercms.studio.model.aws.s3.S3Item) HasPermission(org.craftercms.commons.security.permissions.annotations.HasPermission) AbstractAwsService(org.craftercms.studio.api.v1.service.aws.AbstractAwsService) AwsS3Service(org.craftercms.studio.api.v2.service.aws.s3.AwsS3Service) S3Profile(org.craftercms.commons.config.profiles.aws.S3Profile) StringUtils.stripStart(org.apache.commons.lang3.StringUtils.stripStart) ProtectedResourceId(org.craftercms.commons.security.permissions.annotations.ProtectedResourceId) MimeTypeUtils(org.springframework.util.MimeTypeUtils) StringUtils.appendIfMissing(org.apache.commons.lang3.StringUtils.appendIfMissing) StringUtils(org.apache.commons.lang3.StringUtils) ListObjectsV2Result(com.amazonaws.services.s3.model.ListObjectsV2Result) MimeType(org.springframework.util.MimeType) ListObjectsV2Request(com.amazonaws.services.s3.model.ListObjectsV2Request) AwsException(org.craftercms.studio.api.v1.exception.AwsException) List(java.util.List) Mimetypes(com.amazonaws.services.s3.internal.Mimetypes) S3ClientCachingFactory(org.craftercms.commons.aws.S3ClientCachingFactory) AmazonS3(com.amazonaws.services.s3.AmazonS3) DefaultPermission(org.craftercms.commons.security.permissions.DefaultPermission) Required(org.springframework.beans.factory.annotation.Required) ValidateStringParam(org.craftercms.commons.validation.annotations.param.ValidateStringParam) LinkedList(java.util.LinkedList) InputStream(java.io.InputStream) AmazonS3(com.amazonaws.services.s3.AmazonS3) ListObjectsV2Request(com.amazonaws.services.s3.model.ListObjectsV2Request) ListObjectsV2Result(com.amazonaws.services.s3.model.ListObjectsV2Result) Mimetypes(com.amazonaws.services.s3.internal.Mimetypes) S3Profile(org.craftercms.commons.config.profiles.aws.S3Profile) LinkedList(java.util.LinkedList) MimeType(org.springframework.util.MimeType) HasPermission(org.craftercms.commons.security.permissions.annotations.HasPermission)

Example 2 with ValidateStringParam

use of org.craftercms.commons.validation.annotations.param.ValidateStringParam in project studio by craftercms.

the class SecurityServiceImpl method getUserRoles.

@Override
@ValidateParams
public Set<String> getUserRoles(@ValidateStringParam(name = "site") final String site, @ValidateStringParam(name = "user") String user, boolean includeGlobal) {
    try {
        // TODO: We should replace this with userService.getUserSiteRoles, but that one is protected by permissions.
        // TODO: When the UserService is refactored to use UserServiceInternal, we could use that method and
        // TODO: remove this one
        List<Group> groups = userServiceInternal.getUserGroups(-1, user);
        if (groups != null && groups.size() > 0) {
            logger.debug("Groups for " + user + " in " + site + ": " + groups);
            PermissionsConfigTO rolesConfig = loadConfiguration(site, getRoleMappingsFileName());
            Set<String> userRoles = new HashSet<String>();
            if (rolesConfig != null) {
                Map<String, List<String>> rolesMap = rolesConfig.getRoles();
                for (Group group : groups) {
                    String groupName = group.getGroupName();
                    if (StringUtils.equals(groupName, SYSTEM_ADMIN_GROUP)) {
                        Collection<List<String>> mapValues = rolesMap.values();
                        mapValues.forEach(valueList -> {
                            userRoles.addAll(valueList);
                        });
                        break;
                    } else {
                        List<String> roles = rolesMap.get(groupName);
                        if (roles != null) {
                            userRoles.addAll(roles);
                        }
                    }
                }
            }
            if (includeGlobal) {
                PermissionsConfigTO globalRolesConfig = loadGlobalRolesConfiguration();
                addGlobalUserRoles(user, userRoles, globalRolesConfig);
                List<String> groupNames = groups.stream().map(x -> x.getGroupName()).collect(Collectors.toList());
                addGlobalGroupRoles(userRoles, groupNames, globalRolesConfig);
            }
            return userRoles;
        } else {
            logger.debug("No groups found for " + user + " in " + site);
        }
    } catch (ServiceLayerException | UserNotFoundException e) {
        logger.error("Error while getting groups for user {0}", e);
    }
    return new HashSet<>(0);
}
Also used : ValidateSecurePathParam(org.craftercms.commons.validation.annotations.param.ValidateSecurePathParam) UserServiceInternal(org.craftercms.studio.api.v2.service.security.internal.UserServiceInternal) ZonedDateTime(java.time.ZonedDateTime) SecretKeySpec(javax.crypto.spec.SecretKeySpec) StringUtils(org.apache.commons.lang3.StringUtils) User(org.craftercms.studio.api.v2.dal.User) UserDetailsManager(org.craftercms.studio.api.v1.service.security.UserDetailsManager) KEY_EXTERNALLY_MANAGED(org.craftercms.studio.api.v1.constant.SecurityConstants.KEY_EXTERNALLY_MANAGED) Map(java.util.Map) CONFIGURATION_SITE_ROLE_MAPPINGS_FILE_NAME(org.craftercms.studio.api.v2.utils.StudioConfiguration.CONFIGURATION_SITE_ROLE_MAPPINGS_FILE_NAME) ZoneOffset(java.time.ZoneOffset) CronJobContext(org.craftercms.studio.api.v1.job.CronJobContext) CONFIGURATION_GLOBAL_PERMISSION_MAPPINGS_FILE_NAME(org.craftercms.studio.api.v2.utils.StudioConfiguration.CONFIGURATION_GLOBAL_PERMISSION_MAPPINGS_FILE_NAME) MODULE_STUDIO(org.craftercms.studio.api.v1.constant.StudioConstants.MODULE_STUDIO) SiteFeed(org.craftercms.studio.api.v1.dal.SiteFeed) Set(java.util.Set) SiteService(org.craftercms.studio.api.v1.service.site.SiteService) JavaMailSender(org.springframework.mail.javamail.JavaMailSender) SECURITY_AUTHENTICATION_TYPE(org.craftercms.studio.api.v1.constant.StudioConstants.SECURITY_AUTHENTICATION_TYPE) KEY_EMAIL(org.craftercms.studio.api.v1.constant.SecurityConstants.KEY_EMAIL) StandardCharsets(java.nio.charset.StandardCharsets) ContentTypeConfigTO(org.craftercms.studio.api.v1.to.ContentTypeConfigTO) FILE_SEPARATOR(org.craftercms.studio.api.v1.constant.StudioConstants.FILE_SEPARATOR) NoSuchAlgorithmException(java.security.NoSuchAlgorithmException) ServiceLayerException(org.craftercms.studio.api.v1.exception.ServiceLayerException) SECURITY_CIPHER_KEY(org.craftercms.studio.api.v2.utils.StudioConfiguration.SECURITY_CIPHER_KEY) InvalidKeyException(java.security.InvalidKeyException) KEY_LASTNAME(org.craftercms.studio.api.v1.constant.SecurityConstants.KEY_LASTNAME) SYSTEM_ADMIN_GROUP(org.craftercms.studio.api.v1.constant.StudioConstants.SYSTEM_ADMIN_GROUP) PasswordDoesNotMatchException(org.craftercms.studio.api.v1.exception.security.PasswordDoesNotMatchException) Document(org.dom4j.Document) SECURITY_TYPE(org.craftercms.studio.api.v2.utils.StudioConfiguration.SECURITY_TYPE) ADMIN_ROLE(org.craftercms.studio.api.v1.constant.StudioConstants.ADMIN_ROLE) CONFIGURATION_SITE_PERMISSION_MAPPINGS_FILE_NAME(org.craftercms.studio.api.v2.utils.StudioConfiguration.CONFIGURATION_SITE_PERMISSION_MAPPINGS_FILE_NAME) CollectionUtils(org.apache.commons.collections4.CollectionUtils) AuthenticationChain(org.craftercms.studio.api.v2.service.security.AuthenticationChain) InvalidAlgorithmParameterException(java.security.InvalidAlgorithmParameterException) ArrayList(java.util.ArrayList) SECURITY_CIPHER_ALGORITHM(org.craftercms.studio.api.v2.utils.StudioConfiguration.SECURITY_CIPHER_ALGORITHM) HttpServletRequest(javax.servlet.http.HttpServletRequest) IvParameterSpec(javax.crypto.spec.IvParameterSpec) ContentTypeService(org.craftercms.studio.api.v1.service.content.ContentTypeService) StringTokenizer(java.util.StringTokenizer) PermissionsConfigTO(org.craftercms.studio.api.v1.to.PermissionsConfigTO) RepositoryEventContext(org.craftercms.studio.api.v1.ebus.RepositoryEventContext) SECURITY_CIPHER_TYPE(org.craftercms.studio.api.v2.utils.StudioConfiguration.SECURITY_CIPHER_TYPE) UserExternallyManagedException(org.craftercms.studio.api.v1.exception.security.UserExternallyManagedException) ConfigurationService(org.craftercms.studio.api.v2.service.config.ConfigurationService) StudioConstants(org.craftercms.studio.api.v1.constant.StudioConstants) IOException(java.io.IOException) ObjectFactory(org.springframework.beans.factory.ObjectFactory) Group(org.craftercms.studio.api.v2.dal.Group) SecurityService(org.craftercms.studio.api.v1.service.security.SecurityService) SessionTokenUtils(org.craftercms.studio.impl.v1.util.SessionTokenUtils) MAIL_FROM_DEFAULT(org.craftercms.studio.api.v2.utils.StudioConfiguration.MAIL_FROM_DEFAULT) MAIL_SMTP_AUTH(org.craftercms.studio.api.v2.utils.StudioConfiguration.MAIL_SMTP_AUTH) ValidateStringParam(org.craftercms.commons.validation.annotations.param.ValidateStringParam) Node(org.dom4j.Node) FreeMarkerConfig(org.springframework.web.servlet.view.freemarker.FreeMarkerConfig) UserNotFoundException(org.craftercms.studio.api.v1.exception.security.UserNotFoundException) AuditServiceInternal(org.craftercms.studio.api.v2.service.audit.internal.AuditServiceInternal) ValidateParams(org.craftercms.commons.validation.annotations.param.ValidateParams) AuditLog(org.craftercms.studio.api.v2.dal.AuditLog) HTTP_SESSION_ATTRIBUTE_AUTHENTICATION(org.craftercms.studio.api.v1.constant.StudioConstants.HTTP_SESSION_ATTRIBUTE_AUTHENTICATION) HttpSession(javax.servlet.http.HttpSession) IllegalBlockSizeException(javax.crypto.IllegalBlockSizeException) Collection(java.util.Collection) GroupService(org.craftercms.studio.api.v2.service.security.GroupService) CONFIGURATION_GLOBAL_SYSTEM_SITE(org.craftercms.studio.api.v2.utils.StudioConfiguration.CONFIGURATION_GLOBAL_SYSTEM_SITE) Collectors(java.util.stream.Collectors) SECURITY_SESSION_TIMEOUT(org.craftercms.studio.api.v2.utils.StudioConfiguration.SECURITY_SESSION_TIMEOUT) Base64(java.util.Base64) List(java.util.List) StudioConfiguration(org.craftercms.studio.api.v2.utils.StudioConfiguration) TARGET_TYPE_USER(org.craftercms.studio.api.v2.dal.AuditLogConstants.TARGET_TYPE_USER) RequestContext(org.craftercms.commons.http.RequestContext) Logger(org.craftercms.studio.api.v1.log.Logger) HashMap(java.util.HashMap) Cipher(javax.crypto.Cipher) HashSet(java.util.HashSet) DocumentException(org.dom4j.DocumentException) NoSuchPaddingException(javax.crypto.NoSuchPaddingException) LoggerFactory(org.craftercms.studio.api.v1.log.LoggerFactory) UserDetails(org.springframework.security.core.userdetails.UserDetails) StudioXmlConstants(org.craftercms.studio.api.v1.constant.StudioXmlConstants) MapUtils(org.apache.commons.collections4.MapUtils) ContentService(org.craftercms.studio.api.v1.service.content.ContentService) HttpServletResponse(javax.servlet.http.HttpServletResponse) CONFIGURATION_GLOBAL_ROLE_MAPPINGS_FILE_NAME(org.craftercms.studio.api.v2.utils.StudioConfiguration.CONFIGURATION_GLOBAL_ROLE_MAPPINGS_FILE_NAME) SiteNotFoundException(org.craftercms.studio.api.v1.exception.SiteNotFoundException) KEY_USERNAME(org.craftercms.studio.api.v1.constant.SecurityConstants.KEY_USERNAME) BadPaddingException(javax.crypto.BadPaddingException) OPERATION_LOGOUT(org.craftercms.studio.api.v2.dal.AuditLogConstants.OPERATION_LOGOUT) GeneralLockService(org.craftercms.studio.api.v1.service.GeneralLockService) CONFIGURATION_GLOBAL_CONFIG_BASE_PATH(org.craftercms.studio.api.v2.utils.StudioConfiguration.CONFIGURATION_GLOBAL_CONFIG_BASE_PATH) Element(org.dom4j.Element) KEY_FIRSTNAME(org.craftercms.studio.api.v1.constant.SecurityConstants.KEY_FIRSTNAME) Authentication(org.craftercms.studio.impl.v2.service.security.Authentication) CONFIGURATION_ENVIRONMENT_ACTIVE(org.craftercms.studio.api.v2.utils.StudioConfiguration.CONFIGURATION_ENVIRONMENT_ACTIVE) UserNotFoundException(org.craftercms.studio.api.v1.exception.security.UserNotFoundException) Group(org.craftercms.studio.api.v2.dal.Group) PermissionsConfigTO(org.craftercms.studio.api.v1.to.PermissionsConfigTO) ServiceLayerException(org.craftercms.studio.api.v1.exception.ServiceLayerException) ArrayList(java.util.ArrayList) List(java.util.List) HashSet(java.util.HashSet) ValidateParams(org.craftercms.commons.validation.annotations.param.ValidateParams)

Example 3 with ValidateStringParam

use of org.craftercms.commons.validation.annotations.param.ValidateStringParam in project studio by craftercms.

the class WebDavServiceImpl method list.

/**
 * {@inheritDoc}
 */
@Override
public List<WebDavItem> list(@ValidateStringParam(name = "site_id") final String site, @ValidateStringParam(name = "profile") final String profileId, @ValidateStringParam(name = "path") final String path, @ValidateStringParam(name = "type") final String type) throws WebDavException {
    WebDavProfile profile = getProfile(site, profileId);
    String listPath = StringUtils.appendIfMissing(profile.getBaseUrl(), "/");
    MimeType filterType;
    Sardine sardine = SardineFactory.begin(profile.getUsername(), profile.getPassword());
    try {
        if (StringUtils.isEmpty(type) || type.equals(FILTER_ALL_ITEMS)) {
            filterType = MimeType.valueOf(ALL_VALUE);
        } else {
            filterType = new MimeType(type);
        }
        if (StringUtils.isNotEmpty(path)) {
            String[] tokens = StringUtils.split(path, "/");
            for (String token : tokens) {
                if (StringUtils.isNotEmpty(token)) {
                    listPath += StringUtils.appendIfMissing(UriUtils.encode(token, charset.name()), "/");
                }
            }
        }
        if (!sardine.exists(listPath)) {
            logger.debug("Folder {0} doesn't exist", listPath);
            return Collections.emptyList();
        }
        String basePath = new URL(profile.getBaseUrl()).getPath();
        String baseDomain = profile.getBaseUrl();
        String deliveryUrl = profile.getDeliveryBaseUrl();
        logger.debug("Listing resources at {0}", listPath);
        List<DavResource> resources = sardine.propfind(listPath, 1, properties);
        logger.debug("Found {0} resources at {0}", resources.size(), listPath);
        return resources.stream().skip(// to avoid repeating the folder being listed
        1).filter(r -> r.isDirectory() || filterType.includes(MimeType.valueOf(r.getContentType()))).map(r -> new WebDavItem(getName(r), getUrl(r, baseDomain, deliveryUrl, basePath), r.isDirectory())).collect(Collectors.toList());
    } catch (Exception e) {
        throw new WebDavException("Error listing resources", e);
    }
}
Also used : Sardine(com.github.sardine.Sardine) DEFAULT_NAMESPACE_URI(com.github.sardine.util.SardineUtil.DEFAULT_NAMESPACE_URI) URL(java.net.URL) Logger(org.craftercms.studio.api.v1.log.Logger) StringUtils(org.apache.commons.lang3.StringUtils) DavResource(com.github.sardine.DavResource) HashSet(java.util.HashSet) MimeType(org.springframework.util.MimeType) WebDavException(org.craftercms.studio.api.v1.exception.WebDavException) WebDavItem(org.craftercms.studio.api.v1.webdav.WebDavItem) ALL_VALUE(org.springframework.util.MimeTypeUtils.ALL_VALUE) Charset(java.nio.charset.Charset) LoggerFactory(org.craftercms.studio.api.v1.log.LoggerFactory) SardineFactory(com.github.sardine.SardineFactory) WebDavService(org.craftercms.studio.api.v1.service.webdav.WebDavService) DEFAULT_NAMESPACE_PREFIX(com.github.sardine.util.SardineUtil.DEFAULT_NAMESPACE_PREFIX) Set(java.util.Set) WebDavProfile(org.craftercms.commons.config.profiles.webdav.WebDavProfile) SiteAwareConfigProfileLoader(org.craftercms.studio.impl.v1.util.config.profiles.SiteAwareConfigProfileLoader) Collectors(java.util.stream.Collectors) Sardine(com.github.sardine.Sardine) ConfigurationException(org.craftercms.commons.config.ConfigurationException) List(java.util.List) UriUtils(org.springframework.web.util.UriUtils) QName(javax.xml.namespace.QName) Required(org.springframework.beans.factory.annotation.Required) ValidateStringParam(org.craftercms.commons.validation.annotations.param.ValidateStringParam) Collections(java.util.Collections) InputStream(java.io.InputStream) WebDavItem(org.craftercms.studio.api.v1.webdav.WebDavItem) DavResource(com.github.sardine.DavResource) WebDavException(org.craftercms.studio.api.v1.exception.WebDavException) MimeType(org.springframework.util.MimeType) URL(java.net.URL) WebDavException(org.craftercms.studio.api.v1.exception.WebDavException) ConfigurationException(org.craftercms.commons.config.ConfigurationException) WebDavProfile(org.craftercms.commons.config.profiles.webdav.WebDavProfile)

Example 4 with ValidateStringParam

use of org.craftercms.commons.validation.annotations.param.ValidateStringParam in project studio by craftercms.

the class WebDavServiceImpl method list.

/**
 * {@inheritDoc}
 */
@Override
@ValidateParams
@HasPermission(type = DefaultPermission.class, action = "webdav_read")
public List<WebDavItem> list(@ValidateStringParam(name = "siteId") @ProtectedResourceId("siteId") final String siteId, @ValidateStringParam(name = "profileId") final String profileId, @ValidateStringParam(name = "path") final String path, @ValidateStringParam(name = "type") final String type) throws WebDavException {
    WebDavProfile profile = getProfile(siteId, profileId);
    String listPath = StringUtils.appendIfMissing(profile.getBaseUrl(), "/");
    MimeType filterType;
    try {
        Sardine sardine = createClient(profile);
        if (StringUtils.isEmpty(type) || type.equals(FILTER_ALL_ITEMS)) {
            filterType = MimeType.valueOf(ALL_VALUE);
        } else {
            filterType = new MimeType(type);
        }
        if (StringUtils.isNotEmpty(path)) {
            String[] tokens = StringUtils.split(path, "/");
            for (String token : tokens) {
                if (StringUtils.isNotEmpty(token)) {
                    listPath += StringUtils.appendIfMissing(UriUtils.encode(token, charset.name()), "/");
                }
            }
        }
        if (!sardine.exists(listPath)) {
            logger.debug("Folder {0} doesn't exist", listPath);
            return Collections.emptyList();
        }
        logger.debug("Listing resources at {0}", listPath);
        List<DavResource> resources = sardine.list(listPath, 1, true);
        logger.debug("Found {0} resources at {0}", resources.size(), listPath);
        return resources.stream().skip(// to avoid repeating the folder being listed
        1).filter(r -> r.isDirectory() || filterType.includes(MimeType.valueOf(r.getContentType()))).map(r -> new WebDavItem(getName(r), getUrl(r, profileId, profile), r.isDirectory())).collect(Collectors.toList());
    } catch (Exception e) {
        throw new WebDavException("Error listing resources", e);
    }
}
Also used : Sardine(com.github.sardine.Sardine) Logger(org.craftercms.studio.api.v1.log.Logger) UrlUtils(org.craftercms.commons.lang.UrlUtils) StringUtils(org.apache.commons.lang3.StringUtils) DavResource(com.github.sardine.DavResource) MimeType(org.springframework.util.MimeType) WebDavException(org.craftercms.studio.api.v1.exception.WebDavException) WebDavItem(org.craftercms.studio.api.v1.webdav.WebDavItem) WebDavService(org.craftercms.studio.api.v2.service.webdav.WebDavService) ALL_VALUE(org.springframework.util.MimeTypeUtils.ALL_VALUE) Charset(java.nio.charset.Charset) LoggerFactory(org.craftercms.studio.api.v1.log.LoggerFactory) ValidateParams(org.craftercms.commons.validation.annotations.param.ValidateParams) URI(java.net.URI) HasPermission(org.craftercms.commons.security.permissions.annotations.HasPermission) WebDavProfile(org.craftercms.commons.config.profiles.webdav.WebDavProfile) ProtectedResourceId(org.craftercms.commons.security.permissions.annotations.ProtectedResourceId) SiteAwareConfigProfileLoader(org.craftercms.studio.impl.v1.util.config.profiles.SiteAwareConfigProfileLoader) Collectors(java.util.stream.Collectors) Sardine(com.github.sardine.Sardine) ConfigurationException(org.craftercms.commons.config.ConfigurationException) List(java.util.List) WebDavUtils.createClient(org.craftercms.commons.file.stores.WebDavUtils.createClient) UriUtils(org.springframework.web.util.UriUtils) DefaultPermission(org.craftercms.commons.security.permissions.DefaultPermission) ValidateStringParam(org.craftercms.commons.validation.annotations.param.ValidateStringParam) Collections(java.util.Collections) InputStream(java.io.InputStream) WebDavItem(org.craftercms.studio.api.v1.webdav.WebDavItem) DavResource(com.github.sardine.DavResource) WebDavException(org.craftercms.studio.api.v1.exception.WebDavException) MimeType(org.springframework.util.MimeType) WebDavException(org.craftercms.studio.api.v1.exception.WebDavException) ConfigurationException(org.craftercms.commons.config.ConfigurationException) WebDavProfile(org.craftercms.commons.config.profiles.webdav.WebDavProfile) HasPermission(org.craftercms.commons.security.permissions.annotations.HasPermission) ValidateParams(org.craftercms.commons.validation.annotations.param.ValidateParams)

Aggregations

List (java.util.List)4 StringUtils (org.apache.commons.lang3.StringUtils)4 ValidateStringParam (org.craftercms.commons.validation.annotations.param.ValidateStringParam)4 InputStream (java.io.InputStream)3 Collectors (java.util.stream.Collectors)3 Logger (org.craftercms.studio.api.v1.log.Logger)3 LoggerFactory (org.craftercms.studio.api.v1.log.LoggerFactory)3 MimeType (org.springframework.util.MimeType)3 DavResource (com.github.sardine.DavResource)2 Sardine (com.github.sardine.Sardine)2 Charset (java.nio.charset.Charset)2 Collections (java.util.Collections)2 HashSet (java.util.HashSet)2 Set (java.util.Set)2 Required (org.springframework.beans.factory.annotation.Required)2 AmazonS3 (com.amazonaws.services.s3.AmazonS3)1 Mimetypes (com.amazonaws.services.s3.internal.Mimetypes)1 ListObjectsV2Request (com.amazonaws.services.s3.model.ListObjectsV2Request)1 ListObjectsV2Result (com.amazonaws.services.s3.model.ListObjectsV2Result)1 SardineFactory (com.github.sardine.SardineFactory)1