/** * Creates a new object initialized with the given values. * * @param sources initial value for the {@link AssetDraft#getSources()} property * @param name initial value for the {@link AssetDraft#getName()} property * @return new object initialized with the given values */ public static AssetDraftDsl of(final List<AssetSource> sources, final LocalizedString name) { return new AssetDraftDsl(null, null, null, name, sources, null); }
public AssetDraftDsl withDescription(@Nullable final LocalizedString description) { return newBuilder().description(description).build(); }
public AssetDraftDsl withTags(@Nullable final Set<String> tags) { return newBuilder().tags(tags).build(); }
public AssetDraftDsl withCustom(@Nullable final CustomFieldsDraft custom) { return newBuilder().custom(custom).build(); }
/** * Creates a new instance of {@code AssetDraftDsl} with the values of this builder. * * @return the instance */ public AssetDraftDsl build() { return new AssetDraftDsl(custom, description, key, name, sources, tags); }
public AssetDraftDsl withSources(final List<AssetSource> sources) { return newBuilder().sources(sources).build(); }
/** * Creates a new object initialized with the fields of the template parameter. * * @param template the template * @return a new object initialized from the template */ public static AssetDraftDsl of(final AssetDraft template) { return new AssetDraftDsl(template.getCustom(), template.getDescription(), template.getKey(), template.getName(), template.getSources(), template.getTags()); } }
public AssetDraftDsl withKey(final String key) { return newBuilder().key(key).build(); }
public AssetDraftDsl withName(final LocalizedString name) { return newBuilder().name(name).build(); }