Package org.apache.isis.core.metamodel.adapter

Examples of org.apache.isis.core.metamodel.adapter.ObjectAdapter.titleString()


        if(!getDeploymentType().isProduction()) {
            getSpecificationLoader().invalidateCacheFor(objectAdapter.getObject());
        }

        if(titleString == null) {
            String titleStr = objectAdapter.titleString(null);
            setTitle(titleStr);
        }
       
        addChildComponents(themeDiv, model);
       
View Full Code Here


    public LinkAndLabel newLink(final ObjectAdapterMemento adapterMemento, final ObjectAction action, final String linkId, final ActionPromptProvider actionPromptModalWindowProvider) {
        final ObjectAdapter adapter = adapterMemento.getObjectAdapter(ConcurrencyChecking.NO_CHECK);
       
        final Boolean persistent = adapter.representsPersistent();
        if (!persistent) {
            throw new IllegalArgumentException("Object '" + adapter.titleString(null) + "' is not persistent.");
        }
       
        // check visibility and whether enabled
        final AuthenticationSession session = getAuthenticationSession();
       
View Full Code Here

    }

    private String determineTitle() {
        EntityModel model = getModel();
        final ObjectAdapter adapter = model.getObject();
        return adapter != null ? adapter.titleString(getContextAdapterIfAny()) : "(no object)";
    }

    private int abbreviateTo(EntityModel model, String titleString) {
        if(model.getRenderingHint().isInStandaloneTableTitleColumn()) {
            return getSettings().getMaxTitleLengthInStandaloneTables();
View Full Code Here

                        return false;
                    }

                    // compare the titles
                    final String r = reqd.titleString().toLowerCase();
                    final String s = search.titleString().toLowerCase();

                    // if the pattern occurs in the object
                    if (s.indexOf(r) == -1) {
                        return false;
                    }
View Full Code Here

                    if (parseableFacet != null) {
                        valueStr = parseableFacet.parseableTitle(value);
                    } else if (encodeableFacet != null) {
                        valueStr = encodeableFacet.toEncodedString(value);
                    } else {
                        valueStr = value.titleString();
                    }

                    final boolean notEmpty = (valueStr.length() > 0);
                    if (notEmpty) {
                        xmlValueElement.appendChild(getXmlDocument().createTextNode(valueStr));
View Full Code Here

                    // XML
                    isisMetaModel.setAttributesForReference(xmlReferenceElement, schema.getPrefix(), fullyQualifiedClassName);

                    if (referencedObjectAdapter != null) {
                        isisMetaModel.appendNofTitle(xmlReferenceElement, referencedObjectAdapter.titleString());
                    } else {
                        isisMetaModel.setIsEmptyAttribute(xmlReferenceElement, true);
                    }

                } catch (final Exception ex) {
View Full Code Here

                    final String name = field.getId();
                    if (obj == null) {
                        debugBuilder.appendln(name, "null");
                    } else {
                        debugBuilder.appendln(name, obj.titleString());
                    }
                }
            } catch (final RuntimeException e) {
                debugBuilder.appendException(e);
            }
View Full Code Here

            final ObjectAdapter failedObject = getAdapterManager().getAdapterFor(source);
            getPersistenceSession().reload(failedObject);
            if (LOG.isInfoEnabled()) {
                LOG.info("concurrency conflict: " + e.getMessage());
            }
            throw new ConcurrencyException("Object automatically reloaded: " + failedObject.titleString(), e);
        } catch (final IsisException e) {
            LOG.error("remoting exception", e);
            throw e;
        }
View Full Code Here

        if (source == null) {
            return e;
        }
        final ObjectAdapter failedObject = getAdapterManager().getAdapterFor(source);
        getPersistenceSession().reload(failedObject);
        return new ConcurrencyException("Object automatically reloaded: " + failedObject.titleString(), e);
    }

    private static PersistenceSession getPersistenceSession() {
        return IsisContext.getPersistenceSession();
    }
View Full Code Here

        final ObjectAdapter object = system.createPersistentTestObject();
        final String id = context.mapObject(object);
        // change version on the object being passed back
        object.setOptimisticLock(new TestProxyVersion(5));
        context.getMappedObject(id);
        assertEquals("Reloaded object " + object.titleString(), context.getMessage(1));
    }

    public void testIdentityUsedToLookupAction() {
        final ObjectActionNoop action = new ObjectActionNoop();
        final String id = context.mapAction(action);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.