public void editAndChangeName(
        final CmsClientSitemapEntry entry,
        String newUrlName,
        List<CmsPropertyModification> propertyChanges,
        final boolean keepNewStatus,
        final CmsReloadMode reloadStatus) {

        CmsSitemapChange change = getChangeForEdit(entry, propertyChanges);
        change.setName(newUrlName);
        final CmsUUID entryId = entry.getId();
        final boolean newStatus = keepNewStatus && entry.isNew();

        final CmsUUID updateTarget = ((reloadStatus == CmsReloadMode.reloadParent))
        ? getParentEntry(entry).getId()
        : entryId;
        Command callback = new Command() {

            public void execute() {

                if ((reloadStatus == CmsReloadMode.reloadParent) || (reloadStatus == CmsReloadMode.reloadEntry)) {
                    updateEntry(updateTarget);
                }
                getEntryById(entryId).setNew(newStatus);
            }

        };

        commitChange(change, callback);
    }
public void editAndChangeName ( final CmsClientSitemapEntry entry , String newUrlName , List < CmsPropertyModification > propertyChanges , final boolean keepNewStatus , final CmsReloadMode reloadStatus ) { CmsSitemapChange change = getChangeForEdit ( entry , propertyChanges ) ; change . setName ( newUrlName ) ; final CmsUUID entryId = entry . getId ( ) ; final boolean newStatus = keepNewStatus && entry . isNew ( ) ; final CmsUUID updateTarget = ( ( reloadStatus == CmsReloadMode . reloadParent ) ) ? getParentEntry ( entry ) . getId ( ) : entryId ; Command callback = new Command ( ) { public void execute ( ) { if ( ( reloadStatus == CmsReloadMode . reloadParent ) || ( reloadStatus == CmsReloadMode . reloadEntry ) ) { updateEntry ( updateTarget ) ; } getEntryById ( entryId ) . setNew ( newStatus ) ; } } ; commitChange ( change , callback ) ; }
Edits an entry and changes its URL name.<p>

@param entry the entry which is being edited
@param newUrlName the new URL name of the entry
@param propertyChanges the property changes
@param keepNewStatus <code>true</code> if the entry should keep it's new status
@param reloadStatus a value indicating which entries need to be reloaded after the change