refactored
This commit is contained in:
parent
c34faa9f68
commit
a3cc2aeaa9
|
@ -7,7 +7,7 @@ import java.util.LinkedHashMap;
|
|||
import java.util.List;
|
||||
import java.util.TreeMap;
|
||||
|
||||
import org.gcube.application.geoportalcommon.shared.GeoNaItemRef;
|
||||
import org.gcube.application.geoportalcommon.shared.GeoportalItemReferences;
|
||||
import org.gcube.application.geoportalcommon.shared.SearchingFilter;
|
||||
import org.gcube.application.geoportalcommon.shared.config.GcubeUserRole;
|
||||
import org.gcube.application.geoportalcommon.shared.config.OPERATION_ON_ITEM;
|
||||
|
@ -1413,7 +1413,7 @@ public class GeoPortalDataEntryApp implements EntryPoint {
|
|||
final NewBrowserWindow newBrowserWindow = NewBrowserWindow.open("", "_blank", "");
|
||||
|
||||
GeoportalDataEntryServiceAsync.Util.getInstance().getLinksFor(resultDocumentDV.getId(),
|
||||
resultDocumentDV.getProfileID(), new AsyncCallback<GeoNaItemRef>() {
|
||||
resultDocumentDV.getProfileID(), new AsyncCallback<GeoportalItemReferences>() {
|
||||
@Override
|
||||
public void onFailure(Throwable caught) {
|
||||
hpGetLink.clear();
|
||||
|
@ -1424,7 +1424,7 @@ public class GeoPortalDataEntryApp implements EntryPoint {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void onSuccess(GeoNaItemRef result) {
|
||||
public void onSuccess(GeoportalItemReferences result) {
|
||||
String theURL = result.getRestrictedLink().getShortURL() != null
|
||||
? result.getRestrictedLink().getShortURL()
|
||||
: result.getRestrictedLink().getCompleteURL();
|
||||
|
|
|
@ -2,7 +2,7 @@ package org.gcube.portlets.user.geoportaldataentry.client;
|
|||
|
||||
import java.util.List;
|
||||
|
||||
import org.gcube.application.geoportalcommon.shared.GeoNaItemRef;
|
||||
import org.gcube.application.geoportalcommon.shared.GeoportalItemReferences;
|
||||
import org.gcube.application.geoportalcommon.shared.ResultSetPaginatedData;
|
||||
import org.gcube.application.geoportalcommon.shared.SearchingFilter;
|
||||
import org.gcube.application.geoportalcommon.shared.geoportal.ResultDocumentDV;
|
||||
|
@ -52,7 +52,7 @@ public interface GeoportalDataEntryService extends RemoteService {
|
|||
* @return the links for
|
||||
* @throws Exception the exception
|
||||
*/
|
||||
GeoNaItemRef getLinksFor(String itemId, String profileID) throws Exception;
|
||||
GeoportalItemReferences getLinksFor(String itemId, String profileID) throws Exception;
|
||||
|
||||
/**
|
||||
* Gets the list projects.
|
||||
|
|
|
@ -2,7 +2,7 @@ package org.gcube.portlets.user.geoportaldataentry.client;
|
|||
|
||||
import java.util.List;
|
||||
|
||||
import org.gcube.application.geoportalcommon.shared.GeoNaItemRef;
|
||||
import org.gcube.application.geoportalcommon.shared.GeoportalItemReferences;
|
||||
import org.gcube.application.geoportalcommon.shared.ResultSetPaginatedData;
|
||||
import org.gcube.application.geoportalcommon.shared.SearchingFilter;
|
||||
import org.gcube.application.geoportalcommon.shared.geoportal.ResultDocumentDV;
|
||||
|
@ -56,7 +56,7 @@ public interface GeoportalDataEntryServiceAsync {
|
|||
|
||||
void getGeonaInitConfig(AsyncCallback<GeoportalISConfig> callback);
|
||||
|
||||
void getLinksFor(String itemId, String profileID, AsyncCallback<GeoNaItemRef> callback);
|
||||
void getLinksFor(String itemId, String profileID, AsyncCallback<GeoportalItemReferences> callback);
|
||||
|
||||
void getListProjects(String theProfileID, Integer start, Integer limit, SearchingFilter filter,
|
||||
boolean reloadFromService, AsyncCallback<ResultSetPaginatedData> callback);
|
||||
|
|
|
@ -96,12 +96,17 @@ public class ViewRelationshipPanel extends Composite {
|
|||
|
||||
Modal mw = new Modal(true, true);
|
||||
mw.setTitle("Relationships");
|
||||
|
||||
int width = Window.getClientWidth();
|
||||
if(width > 1024) {
|
||||
width = 1024;
|
||||
mw.setWidth(width);
|
||||
|
||||
int width = 0;
|
||||
try {
|
||||
width = Window.getClientWidth() * 75 / 100;
|
||||
} catch (Exception e) {
|
||||
// TODO: handle exception
|
||||
}
|
||||
|
||||
if (width > 500)
|
||||
mw.setWidth(width);
|
||||
|
||||
mw.add(new ViewRelationshipPanel(appManagerBus, fromProject, false));
|
||||
mw.show();
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package org.gcube.portlets.user.geoportaldataentry.client.ui.report;
|
||||
|
||||
import org.gcube.application.geoportalcommon.shared.GeoNaItemRef;
|
||||
import org.gcube.application.geoportalcommon.shared.GeoportalItemReferences;
|
||||
import org.gcube.application.geoportalcommon.shared.geoportal.project.LifecycleInformationDV;
|
||||
import org.gcube.portlets.user.geoportaldataentry.client.GeoportalDataEntryServiceAsync;
|
||||
import org.gcube.portlets.user.geoportaldataentry.client.ui.utils.HTMLUtil;
|
||||
|
@ -79,7 +79,7 @@ public class LifecycleInformationPanel extends FlowPanel {
|
|||
hpGetLink.add(lc);
|
||||
add(hpGetLink);
|
||||
GeoportalDataEntryServiceAsync.Util.getInstance().getLinksFor(projectID, profileID,
|
||||
new AsyncCallback<GeoNaItemRef>() {
|
||||
new AsyncCallback<GeoportalItemReferences>() {
|
||||
|
||||
@Override
|
||||
public void onFailure(Throwable caught) {
|
||||
|
@ -88,7 +88,7 @@ public class LifecycleInformationPanel extends FlowPanel {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void onSuccess(GeoNaItemRef result) {
|
||||
public void onSuccess(GeoportalItemReferences result) {
|
||||
hpGetLink.clear();
|
||||
String theURL = result.getRestrictedLink().getShortURL() != null
|
||||
? result.getRestrictedLink().getShortURL()
|
||||
|
|
|
@ -23,7 +23,7 @@ import org.gcube.application.geoportalcommon.geoportal.ProjectsCaller;
|
|||
import org.gcube.application.geoportalcommon.geoportal.UseCaseDescriptorCaller;
|
||||
import org.gcube.application.geoportalcommon.shared.GNADataEntryConfigProfile;
|
||||
import org.gcube.application.geoportalcommon.shared.GNADataViewerConfigProfile;
|
||||
import org.gcube.application.geoportalcommon.shared.GeoNaItemRef;
|
||||
import org.gcube.application.geoportalcommon.shared.GeoportalItemReferences;
|
||||
import org.gcube.application.geoportalcommon.shared.ResultSetPaginatedData;
|
||||
import org.gcube.application.geoportalcommon.shared.SearchingFilter;
|
||||
import org.gcube.application.geoportalcommon.shared.config.GcubeUserRole;
|
||||
|
@ -366,14 +366,14 @@ public class GeoportalDataEntryServiceImpl extends RemoteServiceServlet implemen
|
|||
* @throws Exception the exception
|
||||
*/
|
||||
@Override
|
||||
public GeoNaItemRef getLinksFor(String itemId, String profileID) throws Exception {
|
||||
public GeoportalItemReferences getLinksFor(String itemId, String profileID) throws Exception {
|
||||
LOG.info("getLinksFor called");
|
||||
|
||||
SessionUtil.getCurrentContext(this.getThreadLocalRequest(), true);
|
||||
GNADataViewerConfigProfile grViewerProfile = SessionUtil
|
||||
.getGeportalViewerResourceProfile(getThreadLocalRequest());
|
||||
GeoportalCommon gc = new GeoportalCommon(grViewerProfile);
|
||||
GeoNaItemRef item = new GeoNaItemRef(itemId, profileID);
|
||||
GeoportalItemReferences item = new GeoportalItemReferences(itemId, profileID);
|
||||
item = gc.getPublicLinksFor(item, false);
|
||||
LOG.info("Returning: " + item);
|
||||
return item;
|
||||
|
|
Loading…
Reference in New Issue