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

com.enonic.xp.content.ImportContentResult Maven / Gradle / Ivy

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

import com.google.common.base.Preconditions;

public class ImportContentResult
{
    private final Content content;

    private ImportContentResult( Builder builder )
    {
        this.content = builder.content;
    }

    public static Builder create()
    {
        return new Builder();
    }

    public Content getContent()
    {
        return content;
    }

    public static final class Builder
    {
        private Content content;

        private Builder()
        {
        }

        public Builder content( final Content content )
        {
            this.content = content;
            return this;
        }

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

        public ImportContentResult build()
        {
            this.validate();
            return new ImportContentResult( this );
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy