/** * @see * org.opencms.ade.galleries.client.preview.I_CmsResourcePreview#saveProperties(java.util.Map, * com.google.gwt.user.client.Command) */ public void saveProperties( final Map<String, String> properties, final Command afterSaveCallback) { CmsRpcAction<CmsImageInfoBean> action = new CmsRpcAction<CmsImageInfoBean>() { /** @see org.opencms.gwt.client.rpc.CmsRpcAction#execute() */ @Override public void execute() { getService().updateImageProperties(getResourcePath(), getLocale(), properties, this); } /** @see org.opencms.gwt.client.rpc.CmsRpcAction#onResponse(java.lang.Object) */ @Override protected void onResponse(CmsImageInfoBean result) { showData(result); if (afterSaveCallback != null) { afterSaveCallback.execute(); } } }; action.execute(); }
/** * Loads the resource info and displays the retrieved data. * * <p> * * @param resourcePath the resource path */ public void loadResourceInfo(final String resourcePath) { CmsRpcAction<CmsResourceInfoBean> action = new CmsRpcAction<CmsResourceInfoBean>() { /** @see org.opencms.gwt.client.rpc.CmsRpcAction#execute() */ @Override public void execute() { getService().getResourceInfo(resourcePath, getLocale(), this); } /** @see org.opencms.gwt.client.rpc.CmsRpcAction#onResponse(java.lang.Object) */ @Override protected void onResponse(CmsResourceInfoBean result) { showData(result); } }; action.execute(); }
/** * Returns the image info bean for the given resource. * * <p> * * @param resourcePath the resource path * @return the image info bean */ private CmsImageInfoBean getImageInfo(final String resourcePath) { CmsRpcAction<CmsImageInfoBean> action = new CmsRpcAction<CmsImageInfoBean>() { /** @see org.opencms.gwt.client.rpc.CmsRpcAction#execute() */ @Override public void execute() { A_CmsResourcePreview.getService().syncGetImageInfo(resourcePath, getLocale(), this); start(0, true); } /** @see org.opencms.gwt.client.rpc.CmsRpcAction#onResponse(java.lang.Object) */ @Override protected void onResponse(CmsImageInfoBean result) { stop(false); } }; return action.executeSync(); }