Package org.apache.isis.applib

Examples of org.apache.isis.applib.Identifier


    public static boolean isExplorationOrPrototype(final ObjectAction action) {
        return action.getType().isExploration() || action.getType().isPrototype();
    }

    public static String actionIdentifierFor(final ObjectAction action) {
        @SuppressWarnings("unused")
        final Identifier identifier = action.getIdentifier();
       
        final String className = action.getOnType().getShortIdentifier();
        final String actionId = action.getId();
        return className + "-" + actionId;
View Full Code Here


        return str.length() < maxLength ? str : str.substring(0, maxLength - 3) + "...";
    }


    private static String determineActionId(final ObjectAction objectAction) {
        final Identifier identifier = objectAction.getIdentifier();
        if (identifier != null) {
            return identifier.toNameParmsIdentityString();
        }
        // fallback (used for action sets)
        return objectAction.getId();
    }
View Full Code Here

    public static boolean isExplorationOrPrototype(final ObjectAction action) {
        return action.getType().isExploration() || action.getType().isPrototype();
    }

    public static String actionIdentifierFor(ObjectAction action) {
        @SuppressWarnings("unused")
        final Identifier identifier = action.getIdentifier();
       
        final String className = action.getOnType().getShortIdentifier();
        final String actionId = action.getId();
        return className + "-" + actionId;
View Full Code Here

        return str.length() < maxLength ? str : str.substring(0, maxLength - 3) + "...";
    }


    private static String determineActionId(final ObjectAction objectAction) {
        final Identifier identifier = objectAction.getIdentifier();
        if (identifier != null) {
            return identifier.toNameParmsIdentityString();
        }
        // fallback (used for action sets)
        return objectAction.getId();
    }
View Full Code Here

    public static boolean isExplorationOrPrototype(final ObjectAction action) {
        return action.getType().isExploration() || action.getType().isPrototype();
    }

    public static String actionIdentifierFor(ObjectAction action) {
        @SuppressWarnings("unused")
        final Identifier identifier = action.getIdentifier();
       
        final String className = action.getOnType().getShortIdentifier();
        final String actionId = action.getId();
        return className + "-" + actionId;
View Full Code Here

     * time of writing) do not support aggregated Oids for anything other than
     * collections.
     */
    protected ObjectAdapter createAggregatedAdapter(final Object pojo, final ObjectAdapter ownerAdapter, final IdentifiedHolder identifiedHolder) {

        final Identifier identifier = identifiedHolder.getIdentifier();
        ensureMapsConsistent(ownerAdapter);
        Assert.assertNotNull(pojo);

        if (!(identifiedHolder instanceof OneToManyAssociation)) {
            throw new IsisException("only applicable to collections " + pojo + " in " + identifiedHolder);
        }

        // persistence of aggregated follows the parent
        final Oid aggregatedOid = new AggregatedOid(ownerAdapter.getOid(), identifier.getMemberName());
        final ObjectAdapter aggregatedAdapter = createOrRecreateAdapter(pojo, aggregatedOid);

        // we copy over the type onto the adapter itself
        // [not sure why this is really needed, surely we have enough info in
        // the adapter
View Full Code Here

    private static final long serialVersionUID = 1L;

    @Override
    public int compare(final FacetedMethod o1, final FacetedMethod o2) {
        final Identifier identifier1 = o1.getIdentifier();
        final Identifier identifier2 = o2.getIdentifier();
        return identifier1.compareTo(identifier2);
    }
View Full Code Here

    public String disables(final UsabilityContext<? extends UsabilityEvent> ic) {
        if (!(ic instanceof UsabilityContext)) {
            return null;
        }
        final ObjectAdapter toDisable = ic.getTarget();
        final Identifier identifier = ic.getIdentifier();
        return toDisable != null ? disabledReason(toDisable, identifier) : null;
    }
View Full Code Here

            if (tokens.countTokens() != 2) {
                throw new IsisConfigurationException("Invalid line: " + line);
            }
            final String token1 = tokens.nextToken();
            final String token2 = tokens.nextToken();
            final Identifier identifier = memberFromString(token1.trim());
            final List<String> roles = tokenizeRoles(token2);
            final String identityString = identifier.toIdentityString(Identifier.CLASS_MEMBERNAME_PARAMETERS);
            map.put(identityString, roles);
        } else {
            final Map<String, List<String>> newRules = new HashMap<String, List<String>>();
            for (final String name : map.keySet()) {
                final String originalName = line.trim().substring(0, pos);
View Full Code Here

        final boolean allowed = getMember(request.getIdentifier()).isUsable(request.getSession(), targetAdapter).isAllowed();
        return encoderDecoder.encodeAuthorizeResponse(allowed);
    }

    private ObjectMember getMember(final String memberName) {
        final Identifier id = Identifier.fromIdentityString(memberName);
        final ObjectSpecification specification = getSpecificationLoader().loadSpecification(id.getClassName());
        if (id.isPropertyOrCollection()) {
            return getAssociationElseThrowException(id, specification);
        } else {
            return getActionElseThrowException(id, specification);
        }
    }
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.