public CreateSiteParams name( final String name ) { this.name = ContentName.from( name ); return this; }
public static ContentName from( final String name ) { return new ContentName( name ); }
this.name = builder.name; this.parentPath = builder.parentPath; this.path = ContentPath.from( builder.parentPath, builder.name.toString() ); this.id = builder.id; this.data = builder.data;
public boolean hasUniqueness() { return isUnnamed() && this.value.length() > UNNAMED_PREFIX.length(); }
return valueMatches( val, content.getName().toString() );
public Builder name( final String name ) { this.name = ContentName.from( name ); return this; }
public CreatePageTemplateParams name( final String name ) { this.name = ContentName.from( name ); return this; }
public BUILDER name( final String name ) { this.name = ContentName.from( name ); return (BUILDER) this; }
public Builder name( final String name ) { this.name = ContentName.from( name ); return this; }
public static ContentName unnamed() { return from( UNNAMED_PREFIX ); }
public static ContentName uniqueUnnamed() { return from( UNNAMED_PREFIX + UUID.randomUUID().toString() ); } }
public BUILDER path( final ContentPath path ) { this.parentPath = path.getParentPath() != null ? path.getParentPath().asAbsolute() : null; Preconditions.checkArgument( path.elementCount() > 0, "No content can be \"root content\": " + path.toString() ); this.name = ContentName.from( path.getElement( path.elementCount() - 1 ) ); return (BUILDER) this; }
private Content rename( final ContentId sourceId, final String newName ) { final ContentName newContentName = ContentName.from( newName ); final RenameContentParams renameParams = RenameContentParams.create().contentId( sourceId ).newName( newContentName ).build(); return contentService.rename( renameParams ); }