/** * 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 CategoryDraftBuilder of(final Category template) { return new CategoryDraftBuilder(copyAssets(template.getAssets()), copyCustom(template.getCustom()), template.getDescription(), template.getExternalId(), template.getKey(), template.getMetaDescription(), template.getMetaKeywords(), template.getMetaTitle(), template.getName(), template.getOrderHint(), template.getParent(), template.getSlug()); } }
/** * 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 CategoryDraftBuilder of(final CategoryDraft template) { return new CategoryDraftBuilder(template.getAssets(), template.getCustom(), template.getDescription(), template.getExternalId(), template.getKey(), template.getMetaDescription(), template.getMetaKeywords(), template.getMetaTitle(), template.getName(), template.getOrderHint(), template.getParent(), template.getSlug()); }
public static CategoryTree create(final List<Category> allCategoriesAsFlatListWithoutChildrenSettings) { final List<Category> categoryTreeList = categoriesOrganizedAsTree(allCategoriesAsFlatListWithoutChildrenSettings); final List<Category> allAsFlatList = getAllRecursive(categoryTreeList); final Map<LocaleSlugPair, Category> categoriesByLocaleAndSlug = buildBySlugMap(allAsFlatList); final Map<String, Category> categoriesById = buildByIdMap(allAsFlatList); return new CategoryTreeImpl(categoryTreeList, allAsFlatList, categoriesByLocaleAndSlug, categoriesById); }
public static CategoryBuilder of(final Category category) { return new CategoryBuilder(category.getId(), category.getName(), category.getSlug()). version(category.getVersion()).createdAt(category.getCreatedAt()). lastModifiedAt(category.getLastModifiedAt()). name(category.getName()).slug(category.getSlug()).description(category.getDescription()). ancestors(category.getAncestors()).parent(category.getParent()). orderHint(category.getOrderHint()).externalId(category.getExternalId()).children(category.getChildren()). pathInTree(category.getPathInTree()); }
public static CategoryBuilder of(final Category category) { return new CategoryBuilder(category.getId(), category.getName(), category.getSlug()). version(category.getVersion()).createdAt(category.getCreatedAt()). lastModifiedAt(category.getLastModifiedAt()). name(category.getName()).slug(category.getSlug()).description(category.getDescription()). ancestors(category.getAncestors()).parent(category.getParent()).assets(category.getAssets()). orderHint(category.getOrderHint()).externalId(category.getExternalId()); }
@Override public boolean test(final Category category){ return category.getParent() != null; } }
@Override public String toString() { return Category.toString(this); } }
public CategoryDraftDsl withName(final LocalizedString name) { return newBuilder().name(name).build(); }
public CategoryDraftDsl withSlug(final LocalizedString slug) { return newBuilder().slug(slug).build(); }
/** * Creates a new builder with the values of this object. * * @return new builder */ public CategoryDraftBuilder newBuilder() { return new CategoryDraftBuilder(assets, custom, description, externalId, key, metaDescription, metaKeywords, metaTitle, name, orderHint, parent, slug); }
/** * Creates a new instance of {@code CategoryDraftDsl} with the values of this builder. * * @return the instance */ public CategoryDraftDsl build() { return new CategoryDraftDsl(assets, custom, description, externalId, key, metaDescription, metaKeywords, metaTitle, name, orderHint, parent, slug); }
public static CategoryBuilder of(final Category category) { return new CategoryBuilder(category.getId(), category.getName(), category.getSlug()). version(category.getVersion()).createdAt(category.getCreatedAt()). lastModifiedAt(category.getLastModifiedAt()). name(category.getName()).slug(category.getSlug()).description(category.getDescription()). ancestors(category.getAncestors()).parent(category.getParent()). orderHint(category.getOrderHint()).externalId(category.getExternalId()).children(category.getChildren()). pathInTree(category.getPathInTree()); }
/** * 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 CategoryDraftDsl of(final CategoryDraft template) { return new CategoryDraftDsl(template.getAssets(), template.getCustom(), template.getDescription(), template.getExternalId(), template.getKey(), template.getMetaDescription(), template.getMetaKeywords(), template.getMetaTitle(), template.getName(), template.getOrderHint(), template.getParent(), template.getSlug()); } }
public static CategoryTree create(final List<Category> allCategoriesAsFlatListWithoutChildrenSettings) { final List<Category> categoryTreeList = categoriesOrganizedAsTree(allCategoriesAsFlatListWithoutChildrenSettings); final List<Category> allAsFlatList = getAllRecursive(categoryTreeList); final Map<LocaleSlugPair, Category> categoriesByLocaleAndSlug = buildBySlugMap(allAsFlatList); final Map<String, Category> categoriesById = buildByIdMap(allAsFlatList); return new CategoryTreeImpl(categoryTreeList, allAsFlatList, categoriesByLocaleAndSlug, categoriesById); }
@Override public boolean test(final Category category){ return category.getParent() != null; } }
@Override public String toString() { return Category.toString(this); } }
/** * Creates a new object initialized with the given values. * * @param name initial value for the {@link CategoryDraft#getName()} property * @param slug initial value for the {@link CategoryDraft#getSlug()} property * @return new object initialized with the given values */ public static CategoryDraftBuilder of(final LocalizedString name, final LocalizedString slug) { return new CategoryDraftBuilder(null, null, null, null, null, null, null, null, name, null, null, slug); }
public static CategoryBuilder of(final Category category) { return new CategoryBuilder(category.getId(), category.getName(), category.getSlug()). version(category.getVersion()).createdAt(category.getCreatedAt()). lastModifiedAt(category.getLastModifiedAt()). name(category.getName()).slug(category.getSlug()).description(category.getDescription()). ancestors(category.getAncestors()).parent(category.getParent()). orderHint(category.getOrderHint()).children(category.getChildren()). pathInTree(category.getPathInTree()); }
public static CategoryTree create(final List<Category> allCategoriesAsFlatListWithoutChildrenSettings) { final List<Category> categoryTreeList = categoriesOrganizedAsTree(allCategoriesAsFlatListWithoutChildrenSettings); final List<Category> allAsFlatList = getAllRecursive(categoryTreeList); final Map<LocaleSlugPair, Category> categoriesByLocaleAndSlug = buildBySlugMap(allAsFlatList); final Map<String, Category> categoriesById = buildByIdMap(allAsFlatList); return new CategoryTreeImpl(categoryTreeList, allAsFlatList, categoriesByLocaleAndSlug, categoriesById); }
@Override public boolean test(final Category category){ return category.getParent() != null; } }