}
}
public void addImageToContentlet(Contentlet contentlet, String imageInode, String relationName, User user, boolean respectFrontendRoles)throws DotSecurityException, DotDataException {
if(contentlet.getInode().equals(""))
throw new DotContentletStateException(CAN_T_CHANGE_STATE_OF_CHECKED_OUT_CONTENT);
if (InodeUtils.isSet(imageInode)) {
File image = (File) InodeFactory.getInode(imageInode, File.class);
Identifier identifier = APILocator.getIdentifierAPI().find(image);
relAPI.addRelationship(contentlet.getInode(),identifier.getInode(), relationName);
ContentletServices.invalidate(contentlet, true);