ref 18815: Accounting Dashboard Reminiscence
https://support.d4science.org/issues/18815 Updated detached REs supportFuture/18815
parent
2081513f2f
commit
6b7d32fcbf
@ -0,0 +1,51 @@
|
||||
package org.gcube.portlets.user.accountingdashboard.client.application.event;
|
||||
|
||||
import org.gcube.portlets.user.accountingdashboard.shared.env.EnvironmentData;
|
||||
|
||||
import com.google.gwt.event.shared.EventHandler;
|
||||
import com.google.gwt.event.shared.GwtEvent;
|
||||
import com.google.gwt.event.shared.HasHandlers;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Giancarlo Panichi
|
||||
*
|
||||
*/
|
||||
public class EnvironmentEvent extends GwtEvent<EnvironmentEvent.EnvironmentEventHandler> {
|
||||
|
||||
private EnvironmentData environmentData;
|
||||
|
||||
public interface EnvironmentEventHandler extends EventHandler {
|
||||
void onInit(EnvironmentEvent event);
|
||||
}
|
||||
|
||||
public static final Type<EnvironmentEventHandler> TYPE = new Type<>();
|
||||
|
||||
public EnvironmentEvent(EnvironmentData environmentData) {
|
||||
this.environmentData = environmentData;
|
||||
}
|
||||
|
||||
public static void fire(HasHandlers source, EnvironmentEvent event) {
|
||||
source.fireEvent(event);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Type<EnvironmentEventHandler> getAssociatedType() {
|
||||
return TYPE;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void dispatch(EnvironmentEventHandler handler) {
|
||||
handler.onInit(this);
|
||||
}
|
||||
|
||||
public EnvironmentData getEnvironmentData() {
|
||||
return environmentData;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "EnvironmentEvent [environmentData=" + environmentData + "]";
|
||||
}
|
||||
|
||||
}
|
@ -1,4 +1,4 @@
|
||||
package org.gcube.portlets.user.accountingdashboard.server.accounting;
|
||||
package org.gcube.portlets.user.accountingdashboard.shared.env;
|
||||
|
||||
/**
|
||||
*
|
@ -0,0 +1,38 @@
|
||||
package org.gcube.portlets.user.accountingdashboard.shared.env;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Giancarlo Panichi
|
||||
*
|
||||
*/
|
||||
public class EnvironmentData implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 5817114786613046203L;
|
||||
|
||||
private AccountingServiceType accountingServiceType;
|
||||
|
||||
public EnvironmentData() {
|
||||
super();
|
||||
}
|
||||
|
||||
public EnvironmentData(AccountingServiceType accountingServiceType) {
|
||||
super();
|
||||
this.accountingServiceType = accountingServiceType;
|
||||
}
|
||||
|
||||
public AccountingServiceType getAccountingServiceType() {
|
||||
return accountingServiceType;
|
||||
}
|
||||
|
||||
public void setAccountingServiceType(AccountingServiceType accountingServiceType) {
|
||||
this.accountingServiceType = accountingServiceType;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "EnvironmentData [accountingServiceType=" + accountingServiceType + "]";
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in New Issue