public class CertificatesPresenter extends PresenterWithStateMachine<CertificatesPresenter.MyView,CertificatesPresenter.MyProxy> implements CertificatesUIHandlers
| Modifier and Type | Class and Description |
|---|---|
static class |
CertificatesPresenter.CertificatesViewStates
Describes the certificate view visual states.
|
static interface |
CertificatesPresenter.MyProxy
Defines the proxy place for GWTP framework.
|
static interface |
CertificatesPresenter.MyView
This view interface that must be implemented by the concrete view according to GWTP
framework.
|
private static interface |
CertificatesPresenter.RequestParameters
Defines GET Request parameters identifying the current certificate view
|
| Modifier and Type | Field and Description |
|---|---|
private AdminServiceAsync |
adminService
Administration server interface
|
private static boolean[] |
MASK_WEST
Transitional state that defines a set of widgets to which the current state is applied
|
static com.gwtplatform.mvp.client.presenter.slots.NestedSlot |
MODAL_CONTENT
The attachment point for modal dialogs on this view
|
private ModalDialogs |
modalDialogsManager
Common modal dialogs controller
|
private Alarm |
serverAlarmsManager
The server alarm manager
|
private static boolean[] |
STATE_CERTS_MULTI
state definition - multiple selection in certificate list
|
private static boolean[] |
STATE_CERTS_SINGLE
state definition - single selection in certificate list
|
private static boolean[] |
STATE_INITIAL_EMPTY
state definition - initial empty
|
FILTER, filterExp, logger| Constructor and Description |
|---|
CertificatesPresenter(com.google.web.bindery.event.shared.EventBus eventBus,
CertificatesPresenter.MyView view,
CertificatesPresenter.MyProxy proxy,
com.gwtplatform.mvp.client.proxy.PlaceManager placeManager,
ViewStateMachine viewStateMachine,
AdminServiceAsync adminService,
ModalDialogs modalDialogsManager,
Alarm serverAlarmsManager)
Defines the Certificates presenter.
|
| Modifier and Type | Method and Description |
|---|---|
private void |
addCA(CertDef certDef)
Adds new CA certificate given by its certificate definition object.
|
private void |
addNewCertificate(CertDef certDef)
Adds new certificate given by its certificate definition object.
|
void |
addNewCertificate(java.lang.String alias,
java.lang.String[] cert,
CertificatesOptions value)
Adds new PEM certificate.
|
void |
certificatesOptionsChanged(CertificatesOptions value,
boolean unusedOnly)
This method is called if certificate's options are changed.
|
void |
changeAlias(TaggedName selected,
java.lang.String newAlias)
Change alias for the selected certificate.
|
private AsyncAction<java.lang.String,java.lang.Boolean> |
deleteCertificate()
Gets the asynchronous action to delete certificate.
|
private AsyncAction<java.lang.String,CertDef> |
getCertificate()
Gets the asynchronous action to retrieve certificate definition.
|
private AsyncAction<CertDef,java.util.Map<java.lang.String,java.lang.Object>> |
getCertificateDetails()
Gets the asynchronous action to retrieve certificate details data.
|
private java.util.function.Consumer<java.lang.Boolean> |
nextCertToDelete(java.util.Iterator<java.util.Map.Entry<TaggedName,AdminCallback<TaggedName[]>>> iter) |
void |
onCertsSelected(TaggedName[] selected,
CertificatesOptions option,
boolean unusedOnly)
These certificates having the provided options have been selected by a user.
|
void |
onDeleteSelectedCertificates(java.util.Set<TaggedName> selected)
Notifies this set of selected certificates to delete.
|
void |
onRefreshCertificatesList(CertificatesOptions value,
boolean unusedOnly)
Refreshes list of certificates having these options.
|
void |
prepareFromRequest(com.gwtplatform.mvp.shared.proxy.PlaceRequest request)
Loads the data before the associated view will be displayed.
|
private void |
updateCACerts(boolean unusedOnly,
java.lang.Runnable command)
Updates CA certificates model depending on the provided request data.
|
private void |
updateCertificateHierarchyAccounts(TaggedName cert)
Updates the certificate hierarchy accounts.
|
private void |
updateCerts()
Clears the alias parameter and updates certificates model.
|
private void |
updateCerts(CertificatesOptions opt,
boolean unusedOnly,
java.lang.Runnable command)
Updates certificates model depending on the provided request data.
|
private void |
updateCerts(CertificatesOptions opt,
boolean unusedOnly,
java.lang.String alias)
Updates certificates model depending on the provided request data.
|
private void |
updateCerts(java.lang.Runnable command)
Updates certificates model depending on the provided request data.
|
private void |
updatePeerCerts(boolean unusedOnly,
java.lang.Runnable command)
Updates peer certificates model depending on the provided request data.
|
private void |
updateProcessAccounts(TaggedName cert)
Updates the process accounts signed by this certificate.
|
void |
viewCertificate(TaggedName taggedName)
View details of the given selected certificate.
|
changeState, restoreState, setStatebackTo, clearRequestParameter, getCurrentFilter, getCurrentParameter, getPlaceManager, getQueryParametersMap, getQueryString, getQueryString, setFilter, updateBrowserHistorybind, forceReveal, getProxy, getRevealType, getSlot, revealInParent, setRevealType, setSlot, unbind, useManualRevealaddHandler, addRegisteredHandler, addToPopupSlot, addToPopupSlot, addToSlot, addToSlot, addVisibleHandler, asWidget, clearSlot, clearSlot, equals, fireEvent, fireEvent, getChild, getChildren, getChildren, getEventBus, getView, hashCode, isVisible, onHide, onReset, onReveal, registerVisibleHandler, removeFromParentSlot, removeFromPopupSlot, removeFromSlot, removeFromSlot, setInSlot, setInSlot, setInSlot, setInSlotprivate static final boolean[] MASK_WEST
private static final boolean[] STATE_INITIAL_EMPTY
private static final boolean[] STATE_CERTS_SINGLE
private static final boolean[] STATE_CERTS_MULTI
public static final com.gwtplatform.mvp.client.presenter.slots.NestedSlot MODAL_CONTENT
private final AdminServiceAsync adminService
private final ModalDialogs modalDialogsManager
private final Alarm serverAlarmsManager
@Inject
public CertificatesPresenter(com.google.web.bindery.event.shared.EventBus eventBus,
CertificatesPresenter.MyView view,
CertificatesPresenter.MyProxy proxy,
com.gwtplatform.mvp.client.proxy.PlaceManager placeManager,
@Named(value="CertsViewStateMachine")
ViewStateMachine viewStateMachine,
AdminServiceAsync adminService,
ModalDialogs modalDialogsManager,
Alarm serverAlarmsManager)
eventBus - The event busview - The associated viewproxy - The proxy placeplaceManager - The place managerviewStateMachine - The view state machineadminService - The administration servicemodalDialogsManager - The common modal dialogs managerserverAlarmsManager - The server alarmspublic void prepareFromRequest(com.gwtplatform.mvp.shared.proxy.PlaceRequest request)
prepareFromRequest in class com.gwtplatform.mvp.client.Presenter<CertificatesPresenter.MyView,CertificatesPresenter.MyProxy>request - The current requestprivate void updateCerts(CertificatesOptions opt, boolean unusedOnly, java.lang.Runnable command)
opt - The given certificate roleunusedOnly - The given flag to display unused only certificatescommand - The command that will be executed after the server has responded with the data.private void updatePeerCerts(boolean unusedOnly,
java.lang.Runnable command)
unusedOnly - The given flag to display unused only certificatescommand - The command that will be executed after the server has been responded.private void updateCACerts(boolean unusedOnly,
java.lang.Runnable command)
unusedOnly - The given flag to display unused only certificatescommand - The command that will be executed after the server has been responded.public void certificatesOptionsChanged(CertificatesOptions value, boolean unusedOnly)
certificatesOptionsChanged in interface CertificatesUIHandlersvalue - New certificate role.unusedOnly - The new value of the unused checkbox.public void onRefreshCertificatesList(CertificatesOptions value, boolean unusedOnly)
onRefreshCertificatesList in interface CertificatesUIHandlersvalue - New certificate role to display only certificates with this role.unusedOnly - The unused checkbox value to display only unused(Unassigned) certificates.private void updateCerts(CertificatesOptions opt, boolean unusedOnly, java.lang.String alias)
opt - The given certificate roleunusedOnly - The given flag to display unused only certificatesalias - The certificate alias to select after the server has responded with the data.private void updateCerts()
private void updateCerts(java.lang.Runnable command)
command - The command that will be executed after the server has responded with the data.public void addNewCertificate(java.lang.String alias,
java.lang.String[] cert,
CertificatesOptions value)
addNewCertificate in interface CertificatesUIHandlersalias - The certificate namecert - The array of certificate PEM stringsvalue - The certificate role.private void addCA(CertDef certDef)
certDef - The certificate definition objectprivate void addNewCertificate(CertDef certDef)
certDef - The certificate definition objectpublic void onCertsSelected(TaggedName[] selected, CertificatesOptions option, boolean unusedOnly)
onCertsSelected in interface CertificatesUIHandlersselected - The array of certificates selected by a useroption - The current certificate role.unusedOnly - The current unused checkbox value.private void updateProcessAccounts(TaggedName cert)
cert - The certificate given by its tagged nameprivate void updateCertificateHierarchyAccounts(TaggedName cert)
cert - The certificate given by its tagged namepublic void onDeleteSelectedCertificates(java.util.Set<TaggedName> selected)
onDeleteSelectedCertificates in interface CertificatesUIHandlersselected - The selected certificates.private java.util.function.Consumer<java.lang.Boolean> nextCertToDelete(java.util.Iterator<java.util.Map.Entry<TaggedName,AdminCallback<TaggedName[]>>> iter)
private AsyncAction<java.lang.String,java.lang.Boolean> deleteCertificate()
public void changeAlias(TaggedName selected, java.lang.String newAlias)
changeAlias in interface CertificatesUIHandlersselected - The selected certificatenewAlias - New certificate alias (name)private AsyncAction<java.lang.String,CertDef> getCertificate()
private AsyncAction<CertDef,java.util.Map<java.lang.String,java.lang.Object>> getCertificateDetails()
public void viewCertificate(TaggedName taggedName)
viewCertificate in interface CertificatesUIHandlerstaggedName - The selected certificate given by its tagged name