@Override
    public boolean moveResource(CmsObject cms, String source, String destination)
    throws CmsException, CmsIllegalArgumentException {

        CmsResource res = getResource(cms, source);
        if (res != null) {

            // check if destination name is valid
            if (!destination.endsWith("." + getExtension())) {
                throw new CmsIllegalArgumentException(
                    Messages.get().container(Messages.ERR_BAD_RESOURCE_EXTENSION_1, destination));
            }

            cms.moveResource(
                CmsResourceWrapperUtils.removeFileExtension(cms, source, getExtension()),
                CmsResourceWrapperUtils.removeFileExtension(cms, destination, getExtension()));
            return true;
        }

        return false;
    }
@ Override public boolean moveResource ( CmsObject cms , String source , String destination ) throws CmsException , CmsIllegalArgumentException { CmsResource res = getResource ( cms , source ) ; if ( res != null ) { if ( ! destination . endsWith ( "." + getExtension ( ) ) ) { throw new CmsIllegalArgumentException ( Messages . get ( ) . container ( Messages . ERR_BAD_RESOURCE_EXTENSION_1 , destination ) ) ; } cms . moveResource ( CmsResourceWrapperUtils . removeFileExtension ( cms , source , getExtension ( ) ) , CmsResourceWrapperUtils . removeFileExtension ( cms , destination , getExtension ( ) ) ) ; return true ; } return false ; }
@see org.opencms.file.wrapper.A_CmsResourceWrapper#moveResource(org.opencms.file.CmsObject, java.lang.String, java.lang.String)