Interface NamedOperation

All Superinterfaces:
org.springframework.core.Ordered

public interface NamedOperation extends org.springframework.core.Ordered

NamedOperation is an interface that can be implemented to add group of operation.

Here's a sample of what that would look like:

 
 public class CustomNamedOperation implements NamedOperation {
     private static final Map<String, String> CUSTOM_NAMED_OPERATIONS = new HashMap<String, String>(){{
         put("resize", "400x200");
         put("crop", "120x120+10+5");
     }};

     {@code @Override}
     public String getName() {
         return "customName";
     }

     {@code @Override}
     public Map<String, String> getOperations() {
         return CUSTOM_NAMED_OPERATIONS;
     }
 }
 

 @Bean
 
 public NamedOperation customNamedOperation() {
     return new CustomNamedOperation();
 }
 
 
Author:
Dima Myroniuk (dmyroniuk)
See Also:
  • Field Summary

    Fields inherited from interface org.springframework.core.Ordered

    HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
  • Method Summary

    Modifier and Type
    Method
    Description
    Get the name of NamedOperation
    Get the the Map of operations NOTE: the key of this map should be one of the ImageMagick operations that configured by the property broadleaf.image.availableEffects
    default int
     
  • Method Details

    • getOrder

      default int getOrder()
      Specified by:
      getOrder in interface org.springframework.core.Ordered
    • getName

      String getName()
      Get the name of NamedOperation
      Returns:
      the name of NamedOperation
    • getOperations

      Map<String,String> getOperations()
      Get the the Map of operations NOTE: the key of this map should be one of the ImageMagick operations that configured by the property broadleaf.image.availableEffects
      Returns:
      the Map of operations