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

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

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

import com.enonic.xp.annotation.PublicApi;

@PublicApi
public class MoveContentsResult
{
    private final ContentIds movedContents;

    private final String contentName;

    private MoveContentsResult( Builder builder )
    {
        this.movedContents = builder.movedContents.build();
        this.contentName = builder.contentName;
    }

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

    public ContentIds getMovedContents()
    {
        return movedContents;
    }

    public String getContentName()
    {
        return contentName;
    }

    public static final class Builder
    {
        private final ContentIds.Builder movedContents = ContentIds.create();

        private String contentName;

        private Builder()
        {
        }

        public Builder addMoved( final ContentId contentId )
        {
            this.movedContents.add( contentId );
            return this;
        }

        public Builder addMoved( final ContentIds contentIds )
        {
            this.movedContents.addAll( contentIds );
            return this;
        }

        public Builder setContentName( final String contentName )
        {
            this.contentName = contentName;
            return this;
        }

        public MoveContentsResult build()
        {
            return new MoveContentsResult( this );
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy