public CreateSiteParams parent( final ContentPath parentContentPath ) { this.parentContentPath = parentContentPath; Preconditions.checkArgument( parentContentPath.isAbsolute(), "parentContentPath must be absolute: " + parentContentPath ); return this; }
public void validate() { Preconditions.checkNotNull( this.contentPath, "ContentPath cannot be null" ); Preconditions.checkNotNull( this.contentPath.isAbsolute(), "ContentPath must be absolute: " + this.contentPath ); }
private FindContentByParentParams( Builder builder ) { Preconditions.checkArgument( builder.parentPath == null || builder.parentId == null, "expected either parentPath or parentId, but not both" ); if ( builder.parentPath != null ) { Preconditions.checkArgument( builder.parentPath.isAbsolute(), "parentPath must be absolute: " + builder.parentPath ); } this.parentPath = builder.parentPath; this.parentId = builder.parentId; this.size = builder.size; this.from = builder.from; this.childOrder = builder.childOrder; }
public void validate() { Preconditions.checkNotNull( this.parent, "parent cannot be null. Use ContentPath.ROOT when content has no parent." ); Preconditions.checkArgument( this.parent.isAbsolute(), "parent must be absolute: " + this.parent ); Preconditions.checkNotNull( this.name, "name cannot be null" ); Preconditions.checkNotNull( this.byteSource, "byteSource cannot be null" ); }
private void validate() { Preconditions.checkNotNull( parentPath, "parentContentPath cannot be null" ); Preconditions.checkArgument( parentPath.isAbsolute(), "parentContentPath must be absolute: " + parentPath ); Preconditions.checkNotNull( data, "data cannot be null" ); Preconditions.checkNotNull( createAttachments, "createAttachments cannot be null" ); Preconditions.checkNotNull( type, "type cannot be null" ); }
private void validate() { Preconditions.checkNotNull( parent, "parentContentPath cannot be null" ); Preconditions.checkArgument( parent.isAbsolute(), "parentContentPath must be absolute: " + parent ); Preconditions.checkNotNull( data, "data cannot be null" ); Preconditions.checkNotNull( displayName, "displayName cannot be null" ); Preconditions.checkNotNull( createAttachments, "createAttachments cannot be null" ); Preconditions.checkNotNull( type, "type cannot be null" ); Preconditions.checkNotNull( creator, "creator cannot be null" ); Preconditions.checkNotNull( name, "name cannom be null" ); Preconditions.checkNotNull( valid, "valid cannot be null" ); Preconditions.checkNotNull( childOrder, "childOrder cannot be null" ); }
public ContentPath asAbsolute() { if ( isAbsolute() ) { return this; } return new ContentPath.Builder( this ).absolute( true ).build(); }
public static ContentPath from( final ContentPath parent, final ContentPath relative ) { final Builder builder = create().elements( parent.elements ); builder.addElements( relative.elements ); builder.absolute( parent.isAbsolute() ); return builder.build(); }
public static ContentPath from( final ContentPath parent, final String name ) { return create().elements( parent.elements ).absolute( parent.isAbsolute() ).addElement( name ).build(); }