All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.cloudinary.metadata.Restrictions Maven / Gradle / Ivy

Go to download

Cloudinary is a cloud service that offers a solution to a web application's entire image management pipeline. Upload images to the cloud. Automatically perform smart image resizing, cropping and conversion without installing any complex software. Integrate Facebook or Twitter profile image extraction in a snap, in any dimension and style to match your website’s graphics requirements. Images are seamlessly delivered through a fast CDN, and much much more. This Java library allows to easily integrate with Cloudinary in Java applications.

The newest version!
package com.cloudinary.metadata;

import java.util.HashMap;

/**
 * Represents the restrictions metadata field.
 */
public class Restrictions {

    private final HashMap restrictions = new HashMap();

    /**
     * Set the custom field into restrictions.
     * @param key The key of the field.
     * @param value The value of the field.
     */
    public Restrictions setRestriction(String key, Object value) {
        restrictions.put(key, value);
        return this;
    }

    /**
     * Set the read only ui field.
     * @param value The read only ui value.
     */
    public Restrictions setReadOnlyUI(Boolean value) {
        return setRestriction("readonly_ui", value);
    }

    /**
     * Set the read only ui field to true.
     */
    public Restrictions setReadOnlyUI() {
        return this.setReadOnlyUI(true);
    }

    public HashMap toHash() {
        return restrictions;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy