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

com.enonic.xp.page.CreatePageParams Maven / Gradle / Ivy

There is a newer version: 7.14.4
Show newest version
package com.enonic.xp.page;

import com.google.common.base.Preconditions;

import com.enonic.xp.annotation.PublicApi;
import com.enonic.xp.content.ContentId;
import com.enonic.xp.data.PropertyTree;
import com.enonic.xp.region.Component;

@PublicApi
public final class CreatePageParams
{
    private ContentId content;

    private DescriptorKey controller;

    private PageTemplateKey pageTemplate;

    private PageRegions regions;

    private Component fragment;

    private PropertyTree config;

    private boolean customized;

    public CreatePageParams content( ContentId value )
    {
        this.content = value;
        return this;
    }

    public CreatePageParams controller( DescriptorKey value )
    {
        this.controller = value;
        return this;
    }

    public CreatePageParams pageTemplate( PageTemplateKey value )
    {
        this.pageTemplate = value;
        return this;
    }

    public CreatePageParams regions( PageRegions value )
    {
        this.regions = value;
        return this;
    }

    public CreatePageParams fragment( Component fragment )
    {
        this.fragment = fragment;
        return this;
    }

    public CreatePageParams config( PropertyTree value )
    {
        this.config = value;
        return this;
    }

    public CreatePageParams customized( boolean value )
    {
        this.customized = value;
        return this;
    }

    public ContentId getContent()
    {
        return content;
    }

    public PageTemplateKey getPageTemplate()
    {
        return pageTemplate;
    }

    public DescriptorKey getController()
    {
        return controller;
    }

    public PageRegions getRegions()
    {
        return regions;
    }

    public PropertyTree getConfig()
    {
        return config;
    }

    public boolean isCustomized()
    {
        return customized;
    }

    public Component getFragment()
    {
        return fragment;
    }

    public void validate()
    {
        Preconditions.checkNotNull( this.content, "content cannot be null" );
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy