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

com.kasisoft.mgnl.fragments.servlets.FragmentDefinition Maven / Gradle / Ivy

The newest version!
package com.kasisoft.mgnl.fragments.servlets;

import org.apache.http.*;

import javax.jcr.*;

import java.util.function.*;

import java.util.*;

import lombok.experimental.*;

import lombok.*;

/**
 * Each fragment consists of the following parameters:
 * 
 * 
    *
  • name : The segment below the fragment path.
  • *
  • template : The template URI.
  • *
  • setup : A method filling the model map.
  • *
* * The model map will definitely include the attributes segmentName and subPath. * The segmentName is the name associated with this fragment. The subPath is the * path below the segmentName (might be null). * * For instance: * * /fragments/menu -> segmentName = 'menu', subPath = '' * /fragments/menu/341 -> segmentName = 'menu', subPath = '342' * /fragments/menu/main/abc -> segmentName = 'menu', subPath = 'main/abc' * * @author [email protected] */ @Data @FieldDefaults(level = AccessLevel.PRIVATE) public class FragmentDefinition { Function, Node> nodeIdentifier; Consumer> modelInitializer; String contentType; String i18nBasename; String name; String template; Boolean getOrPost; int errorCode = HttpStatus.SC_INTERNAL_SERVER_ERROR; Class modelClass; public boolean isValid() { return (modelInitializer != null) && (nodeIdentifier != null) && (name != null) && (template != null); } } /* ENDCLASS */




© 2015 - 2025 Weber Informatics LLC | Privacy Policy