- Add the Codota plugin to your IDE and get smart completions
private void myMethod () {Charset c =
String charsetName;Charset.forName(charsetName)
Charset.defaultCharset()
ContentType contentType;contentType.getCharset()
- Smart code suggestions by Codota
}
private static ContentPath translateNodePathToContentPath( final NodePath nodePath ) { final String contentPath = StringUtils.substringAfter( nodePath.asAbsolute().toString(), CONTENT_ROOT_NODE_NAME + "/" ); return ContentPath.from( contentPath ).asAbsolute(); } }
private boolean contentExists( final String contentSelector ) { final ContentId contentId = ContentId.from( contentSelector.substring( 1 ) ); final ContentPath contentPath = ContentPath.from( contentSelector ).asAbsolute(); return this.contentService.contentExists( contentId ) || this.contentService.contentExists( contentPath ); }
protected final Content getContentOrNull( final String contentSelector ) { final boolean inEditMode = ( this.request.getMode() == RenderMode.EDIT ); if ( inEditMode ) { final ContentId contentId = ContentId.from( contentSelector.substring( 1 ) ); final Content contentById = getContentById( contentId ); if ( contentById != null ) { return contentById; } } final ContentPath contentPath = ContentPath.from( contentSelector ).asAbsolute(); return getContentByPath( contentPath ); }
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; }
return move( sourceId, ContentPath.from( target ).asAbsolute() );