68 lines
1.6 KiB
Java
68 lines
1.6 KiB
Java
package org.gcube.portlets.user.geoportaldataentry.client.events;
|
|
|
|
import org.gcube.application.geoportalcommon.shared.geoportal.ResultDocumentDV;
|
|
import org.gcube.application.geoportalcommon.shared.geoportal.ucd.RelationshipDefinitionDV;
|
|
|
|
import com.google.gwt.event.shared.GwtEvent;
|
|
|
|
public class CreateRelationHandlerEvent extends GwtEvent<CreateRelationHandler> {
|
|
|
|
/** The type. */
|
|
public static Type<CreateRelationHandler> TYPE = new Type<CreateRelationHandler>();
|
|
private ResultDocumentDV fromProject;
|
|
private RelationshipDefinitionDV relationSelected;
|
|
private ResultDocumentDV toProject;
|
|
|
|
public CreateRelationHandlerEvent(ResultDocumentDV fromProject, RelationshipDefinitionDV relationSelected,
|
|
ResultDocumentDV toProject) {
|
|
this.fromProject = fromProject;
|
|
this.relationSelected = relationSelected;
|
|
this.toProject = toProject;
|
|
}
|
|
|
|
/**
|
|
* Gets the associated type.
|
|
*
|
|
* @return the associated type
|
|
*/
|
|
/*
|
|
* (non-Javadoc)
|
|
*
|
|
* @see com.google.gwt.event.shared.GwtEvent#getAssociatedType()
|
|
*/
|
|
@Override
|
|
public Type<CreateRelationHandler> getAssociatedType() {
|
|
return TYPE;
|
|
}
|
|
|
|
/**
|
|
* Dispatch.
|
|
*
|
|
* @param handler the handler
|
|
*/
|
|
/*
|
|
* (non-Javadoc)
|
|
*
|
|
* @see
|
|
* com.google.gwt.event.shared.GwtEvent#dispatch(com.google.gwt.event.shared.
|
|
* EventHandler)
|
|
*/
|
|
@Override
|
|
protected void dispatch(CreateRelationHandler handler) {
|
|
handler.onCreateRelation(this);
|
|
}
|
|
|
|
public ResultDocumentDV getFromProject() {
|
|
return fromProject;
|
|
}
|
|
|
|
public RelationshipDefinitionDV getRelationSelected() {
|
|
return relationSelected;
|
|
}
|
|
|
|
public ResultDocumentDV getToProject() {
|
|
return toProject;
|
|
}
|
|
|
|
}
|