Package org.apache.isis.applib

Examples of org.apache.isis.applib.Identifier


            }
            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


        final IdentifiedHolder identifiedHolder = (IdentifiedHolder) facetHolder;
        return decorateWithHelpFacet(facet, identifiedHolder);
    }

    private Facet decorateWithHelpFacet(final Facet facet, final IdentifiedHolder identifiedHolder) {
        final Identifier identifier = identifiedHolder.getIdentifier();

        final String helpText = helpManager.getHelpText(identifier);
        if (helpText != null) {
            final HelpFacetLookedUpViaHelpManager decoratingFacet = new HelpFacetLookedUpViaHelpManager(helpText, facet.getFacetHolder());
            identifiedHolder.addFacet(decoratingFacet);
View Full Code Here

        return null;
    }

    private Facet decorateWithNamedFacet(final Facet facet, final IdentifiedHolder identifiedHolder) {

        final Identifier identifier = identifiedHolder.getIdentifier();
        final String i18nName = i18nManager.getName(identifier);
        if (i18nName == null) {
            return null;
        }
        final NamedFacetWrapI18n decoratingFacet = new NamedFacetWrapI18n(i18nName, facet.getFacetHolder());
View Full Code Here

        identifiedHolder.addFacet(decoratingFacet);
        return decoratingFacet;
    }

    private Facet decorateWithDescribedAsFacet(final Facet facet, final IdentifiedHolder identifiedHolder) {
        final Identifier identifier = identifiedHolder.getIdentifier();
        final String i18nDescription = i18nManager.getDescription(identifier);
        if (i18nDescription == null) {
            return null;
        }
        final DescribedAsFacetWrapI18n decoratingFacet = new DescribedAsFacetWrapI18n(i18nDescription, facet.getFacetHolder());
View Full Code Here

        identifiedHolder.addFacet(decoratingFacet);
        return decoratingFacet;
    }

    private Facet decorateWithHelpFacet(final Facet facet, final IdentifiedHolder identifiedHolder) {
        final Identifier identifier = identifiedHolder.getIdentifier();
        final String i18nHelp = i18nManager.getHelp(identifier);
        if (i18nHelp == null) {
            return null;
        }
        final HelpFacetWrapI18n decoratingFacet = new HelpFacetWrapI18n(i18nHelp, facet.getFacetHolder());
View Full Code Here

        FacetUtil.addFacet(notPersistedFacet);
        FacetUtil.addFacet(disabledFacet);
        FacetUtil.addFacet(typeOfFacet);
       
        // calculate the identifier
        final Identifier contributorIdentifier = serviceAction.getFacetedMethod().getIdentifier();
        final String memberName = contributorIdentifier.getMemberName();
        List<String> memberParameterNames = contributorIdentifier.getMemberParameterNames();
       
        identifier = Identifier.actionIdentifier(contributeeType.getCorrespondingClass().getName(), memberName, memberParameterNames);
    }
View Full Code Here

    }

    @Test
    public void property_whenMethodNameIs_XYyyZzz() throws Exception {
        final Method method = SomeDomainClass.class.getMethod("getABigDecimal");
        final Identifier identifierFor = FeatureType.PROPERTY.identifierFor(SomeDomainClass.class, method);
        assertThat(identifierFor.getMemberName(), is("ABigDecimal")); // very
                                                                      // odd
                                                                      // compared
                                                                      // to
                                                                      // anotherBigDecimal,
                                                                      // but
View Full Code Here

            final ObjectAdapter targetAdapter,
            final ObjectAdapter[] argumentAdapters) {
     
    try {
      final Class type = eventType;
      Identifier actionIdentifier = owningAction.getIdentifier();
          final Object source = AdapterUtils.unwrap(targetAdapter);
      final Object[] arguments = AdapterUtils.unwrap(argumentAdapters);
            @SuppressWarnings("unchecked")
            final ActionInvokedEvent<?> event = org.apache.isis.core.metamodel.facets.actions.event.PostsActionInvokedEventFacet.Util.newEvent(type, source, actionIdentifier, arguments);
      getEventBusService().post(event);
View Full Code Here

    }

    @Test
    public void property_whenMethodNameIs_XxxxYyyZzz() throws Exception {
        final Method method = SomeDomainClass.class.getMethod("getAnotherBigDecimal");
        final Identifier identifierFor = FeatureType.PROPERTY.identifierFor(SomeDomainClass.class, method);
        assertThat(identifierFor.getMemberName(), is("anotherBigDecimal"));
    }
View Full Code Here

       
        FacetUtil.addFacet(notPersistedFacet);
        FacetUtil.addFacet(disabledFacet);
       
        // calculate the identifier
        final Identifier contributorIdentifier = serviceAction.getFacetedMethod().getIdentifier();
        final String memberName = contributorIdentifier.getMemberName();
        List<String> memberParameterNames = contributorIdentifier.getMemberParameterNames();
       
        identifier = Identifier.actionIdentifier(contributeeType.getCorrespondingClass().getName(), memberName, memberParameterNames);
    }
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.