Package org.apache.isis.applib

Examples of org.apache.isis.applib.Identifier


    @Test
    public void defaultEventType() throws Exception {
       
        SomeDomainObject sdo = new SomeDomainObject();
        Identifier identifier = Identifier.propertyOrCollectionIdentifier(SomeDomainObject.class, "someDateProperty");
        LocalDate oldValue = new LocalDate(2013,4,1);
        LocalDate newValue = new LocalDate(2013,5,2);
       
        final PropertyChangedEvent<Object, Object> ev =
                PostsPropertyChangedEventSetterFacet.Util.newEvent(PropertyChangedEvent.Default.class, sdo, identifier, oldValue, newValue);
View Full Code Here


    @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 = new LocalDate(2013,5,2);
       
        final PropertyChangedEvent<SomeDomainObject, LocalDate> ev =
                PostsPropertyChangedEventSetterFacet.Util.newEvent(SomeDatePropertyChangedEvent.class, sdo, identifier, oldValue, newValue);
View Full Code Here

        public Properties metadataProperties(String subKey) {
           
            if(metadataProperties == null) {
                return null;
            }
            Identifier identifier = getFacetHolder().getIdentifier();
            final String id = identifier.getMemberName();
           
            // build list of keys to search for...
            final List<String> keys = Lists.newArrayList();
            if(getFacetHolder() instanceof ObjectAction) {
                // ... either "action.actionId" or "member.actionId()"
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

        manager.addLine("M:fld");
        manager.addLine("Help about method");
        manager.addLine("M:fld2");
        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

        manager.addLine("C:cls");
        manager.addLine("Help about class");
        manager.addLine("M:method");
        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

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.