com.cloudinary.transformation.Expression Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of cloudinary-core Show documentation
Show all versions of cloudinary-core Show documentation
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.transformation;
/**
* Represents a transformation parameter expression.
*/
public class Expression extends BaseExpression {
private boolean predefined = false;
public Expression(){
super();
}
public Expression(String name){
super();
expressions.add(name);
}
public static Expression variable(String name, Object value){
Expression var = new Expression(name);
var.expressions.add(value.toString());
return var;
}
public static Expression faceCount() {
return new Expression("fc");
}
@Override
protected Expression newInstance() {
return new Expression();
}
/*
* @returns a new expression with the predefined variable "width"
*/
public static Expression width() {
return new Expression("width");
}
/*
* @returns a new expression with the predefined variable "height"
*/
public static Expression height() {
return new Expression("height");
}
/*
* @returns a new expression with the predefined variable "initialWidth"
*/
public static Expression initialWidth() {
return new Expression("initialWidth");
}
/*
* @returns a new expression with the predefined variable "initialHeight"
*/
public static Expression initialHeight() {
return new Expression("initialHeight");
}
/*
* @returns a new expression with the predefined variable "aspectRatio"
*/
public static Expression aspectRatio() {
return new Expression("aspectRatio");
}
/*
* @returns a new expression with the predefined variable "initialAspectRatio"
*/
public static Expression initialAspectRatio() {
return new Expression("initialAspectRatio");
}
/*
* @returns a new expression with the predefined variable "pageCount"
*/
public static Expression pageCount() {
return new Expression("pageCount");
}
/*
* @returns a new expression with the predefined variable "currentPage"
*/
public static Expression currentPage() {
return new Expression("currentPage");
}
/*
* @returns a new expression with the predefined variable "tags"
*/
public static Expression tags() {
return new Expression("tags");
}
/*
* @returns a new expression with the predefined variable "pageX"
*/
public static Expression pageX() {
return new Expression("pageX");
}
/*
* @returns a new expression with the predefined variable "pageY"
*/
public static Expression pageY() {
return new Expression("pageY");
}
}