Package org.apache.isis.applib

Examples of org.apache.isis.applib.Identifier


    @Test
    public void customEventType() throws Exception {

        SomeDomainObject sdo = new SomeDomainObject();
        Identifier identifier = Identifier.propertyOrCollectionIdentifier(SomeDomainObject.class, "someDateProperty");
        LocalDate oldValue = new LocalDate(2013,4,1);
        LocalDate newValue = null;
       
        final PropertyInteractionEvent<SomeDomainObject, LocalDate> ev =
                new InteractionHelper(null).newPropertyInteractionEvent(SomeDatePropertyChangedEvent.class, identifier, sdo, oldValue, newValue);
View Full Code Here


   
    @Test
    public void defaultEventType() throws Exception {
        final SomeDomainObject sdo = new SomeDomainObject();
        final SomeReferencedObject other = new SomeReferencedObject();
        final Identifier identifier = Identifier.propertyOrCollectionIdentifier(SomeDomainObject.class, "references");

        final CollectionInteractionEvent<Object, Object> ev = new InteractionHelper(null).newCollectionInteractionEvent(
                CollectionInteractionEvent.Default.class, null, identifier, sdo, CollectionInteractionEvent.Of.ADD_TO, other);
        assertThat(ev.getSource(), is((Object)sdo));
        assertThat(ev.getIdentifier(), is(identifier));
View Full Code Here

    @Test
    public void collectionAddedToDefaultEventType() throws Exception {
        final SomeDomainObject sdo = new SomeDomainObject();
        final SomeReferencedObject other = new SomeReferencedObject();
        final Identifier identifier = Identifier.propertyOrCollectionIdentifier(SomeDomainObject.class, "references");

        final CollectionInteractionEvent<Object, Object> ev = new InteractionHelper(null).newCollectionInteractionEvent(
                CollectionAddedToEvent.Default.class, AbstractInteractionEvent.Phase.EXECUTED, identifier, sdo, CollectionInteractionEvent.Of.ADD_TO, other);
        assertThat(ev.getSource(), is((Object)sdo));
        assertThat(ev.getIdentifier(), is(identifier));
View Full Code Here

    @Test
    public void customEventType() throws Exception {
        final SomeDomainObject sdo = new SomeDomainObject();
        final SomeReferencedObject other = new SomeReferencedObject();
        final Identifier identifier = Identifier.propertyOrCollectionIdentifier(SomeDomainObject.class, "references");
       
        final CollectionInteractionEvent<SomeDomainObject, SomeReferencedObject> ev = new InteractionHelper(null).newCollectionInteractionEvent(
                SomeDomainObjectCollectionEvent.class, AbstractInteractionEvent.Phase.EXECUTED, identifier, sdo, CollectionInteractionEvent.Of.ADD_TO, other);
        assertThat(ev.getSource(), is(sdo));
        assertThat(ev.getIdentifier(), is(identifier));
View Full Code Here

            }
            final PublishedAction.PayloadFactory payloadFactory = publishedActionFacet.value();
           
            final RootOid adapterOid = (RootOid) currentInvocation.getTarget().getOid();
            final String oidStr = getOidMarshaller().marshal(adapterOid);
            final Identifier actionIdentifier = action.getIdentifier();
            final String title = oidStr + ": " + actionIdentifier.toNameParmsIdentityString();
           
            final Command command = currentInvocation.getCommand();
            final String targetClass = command.getTargetClass();
            final String targetAction = command.getTargetAction();
            final Bookmark target = command.getTarget();
View Full Code Here

    protected void setUp() throws Exception {
        manager = new TestHelpManager(new IsisConfigurationDefault());
    }

    public void testNoLines() {
        final Identifier identifier = Identifier.propertyOrCollectionIdentifier("cls", "mth");
        final String s = manager.getHelpText(identifier);
        assertEquals("", s);
    }
View Full Code Here

    public void testClass() {
        manager.addLine("C:cls");
        manager.addLine("Help about class");

        final Identifier identifier = Identifier.classIdentifier("cls");
        final String s = manager.getHelpText(identifier);
        assertEquals("Help about class\n", s);
    }
View Full Code Here

    public void testClassWithNoText() {
        manager.addLine("C:cls");
        manager.addLine("C:cls2");
        manager.addLine("Help about class");

        final Identifier identifier = Identifier.classIdentifier("cls");
        final String s = manager.getHelpText(identifier);
        assertEquals("", s);
    }
View Full Code Here

        manager.addLine("C:cls");
        manager.addLine("Help about class");
        manager.addLine("C:cls2");
        manager.addLine("Different text");

        final Identifier identifier = Identifier.classIdentifier("cls");
        final String s = manager.getHelpText(identifier);
        assertEquals("Help about class\n", s);
    }
View Full Code Here

        manager.addLine("M:fld");
        manager.addLine("Help about method");
        manager.addLine("C:cls2");
        manager.addLine("Different text");

        final Identifier identifier = Identifier.propertyOrCollectionIdentifier("cls", "fld");
        final String s = manager.getHelpText(identifier);
        assertEquals("Help about method\n", s);
    }
View Full Code Here

TOP

Related Classes of org.apache.isis.applib.Identifier

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.