Search in sources :

Example 6 with Operator

use of eu.ggnet.dwoss.rights.api.Operator in project dwoss by gg-net.

the class ProductListTryout method main.

/**
 * The main() method is ignored in correctly deployed JavaFX application.
 * main() serves only as fallback in case the application can not be
 * launched through deployment artifacts, e.g., in IDEs with limited FX
 * support. NetBeans ignores main().
 *
 * @param args the command line arguments
 */
public static void main(String[] args) {
    Dl.remote().add(UniqueUnitAgent.class, new UniqueUnitAgentStub());
    Dl.local().add(Guardian.class, new AbstractGuardian() {

        {
            setRights(new Operator("hans", 123, Arrays.asList(AtomicRight.values())));
        }

        @Override
        public void login(String user, char[] pass) throws AuthenticationException {
        }
    });
    JButton close = new JButton("Schliessen");
    close.addActionListener(e -> Ui.closeWindowOf(close));
    JButton run = new JButton("OpenUi");
    run.addActionListener(ev -> {
        Ui.exec(() -> {
            Ui.build().fxml().show(ProductListController.class);
        });
    });
    JPanel p = new JPanel();
    p.add(run);
    p.add(close);
    UiCore.startSwing(() -> p);
}
Also used : Operator(eu.ggnet.dwoss.rights.api.Operator) JPanel(javax.swing.JPanel) AuthenticationException(eu.ggnet.saft.core.auth.AuthenticationException) JButton(javax.swing.JButton) AbstractGuardian(eu.ggnet.dwoss.common.AbstractGuardian) UniqueUnitAgentStub(tryout.stub.UniqueUnitAgentStub)

Aggregations

Operator (eu.ggnet.dwoss.rights.api.Operator)6 AbstractGuardian (eu.ggnet.dwoss.common.AbstractGuardian)4 AuthenticationException (eu.ggnet.saft.core.auth.AuthenticationException)4 Test (org.junit.Test)3 Mandators (eu.ggnet.dwoss.mandator.Mandators)2 CustomerUpi (eu.ggnet.dwoss.customer.upi.CustomerUpi)1 DocumentViewType (eu.ggnet.dwoss.mandator.api.DocumentViewType)1 DefaultCustomerSalesdata (eu.ggnet.dwoss.mandator.api.value.DefaultCustomerSalesdata)1 Document (eu.ggnet.dwoss.redtape.ee.entity.Document)1 Dossier (eu.ggnet.dwoss.redtape.ee.entity.Dossier)1 DocumentUpdateController (eu.ggnet.dwoss.redtapext.ui.cao.document.DocumentUpdateController)1 DocumentUpdateView (eu.ggnet.dwoss.redtapext.ui.cao.document.DocumentUpdateView)1 PicoStock (eu.ggnet.dwoss.stock.api.PicoStock)1 StockUpiImpl (eu.ggnet.dwoss.stock.upi.impl.StockUpiImpl)1 FileJacket (eu.ggnet.dwoss.util.FileJacket)1 UserInfoException (eu.ggnet.dwoss.util.UserInfoException)1 RemoteLookup (eu.ggnet.saft.core.cap.RemoteLookup)1 Font (java.awt.Font)1 JButton (javax.swing.JButton)1 JLabel (javax.swing.JLabel)1