Package org.lightadmin.core.storage

Examples of org.lightadmin.core.storage.FileResourceStorage


        return toEmptyResponse(METHOD_NOT_ALLOWED);
    }

    private FilePropertyValue evaluateFilePropertyValue(Object instance, PersistentProperty persistentProperty) {
        FileResourceStorage fileResourceStorage = fileResourceStorage();

        try {
            if (!fileResourceStorage.fileExists(instance, persistentProperty)) {
                return new FilePropertyValue(false);
            }

            Link fileLink = entityLinks().linkForFilePropertyLink(instance, persistentProperty);

            byte[] fileData = fileResourceStorage.load(instance, persistentProperty);

            return new FilePropertyValue(fileLink, fileData);

        } catch (Exception e) {
            throw new ResourceNotFoundException(e.getMessage());
View Full Code Here

TOP

Related Classes of org.lightadmin.core.storage.FileResourceStorage

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.