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

Examples of org.apache.isis.core.metamodel.adapter.mgr.AdapterManager


    }

    private void listServices(final Context context, final Block navigationBar) {
        final Block taskBar = context.getComponentFactory().createBlock("services", null);
        taskBar.add(context.getComponentFactory().createHeading("Services"));
        final AdapterManager adapterManager = IsisContext.getPersistenceSession().getAdapterManager();
        final List<Object> services = getUserProfile().getPerspective().getServices();
        for (final Object service : services) {
            final ObjectAdapter serviceAdapter = adapterManager.adapterFor(service);
            if (serviceAdapter == null) {
                LOG.warn("unable to find service Id: " + service + "; skipping");
                continue;
            }
            if (isHidden(serviceAdapter)) {
View Full Code Here


           
        }, calledFrom);
    }
   
    private String logString(CalledFrom calledFrom, LoggingLocation location, PersistenceCapable pojo) {
        final AdapterManager adapterManager = getAdapterManager();
        final ObjectAdapter adapter = adapterManager.getAdapterFor(pojo);
        // initial spaces just to look better in log when wrapped by IsisLifecycleListener...
        return calledFrom.name() + " " + location.prefix + " oid=" + (adapter !=null? adapter.getOid(): "(null)") + " ,pojo " + pojo;
    }
View Full Code Here

            @Override
            public void execute(final Workspace workspace, final View view, final Location at) {
                final List<Object> servicePojos = IsisContext.getServices();
                final List<ObjectAdapter> serviceAdapters = Lists.newArrayList();
                for (final Object servicePojo : servicePojos) {
                    final AdapterManager adapterManager = getPersistenceSession().getAdapterManager();
                    serviceAdapters.add(adapterManager.adapterFor(servicePojo));
                }
                final ObjectSpecification spec = getSpecificationLoader().loadSpecification(Object.class);
                final FreeStandingList collection = new FreeStandingList(spec, serviceAdapters);
                addWindowFor(getAdapterManager().adapterFor(collection), new Placement(at));
            }
View Full Code Here

           
        }, calledFrom);
    }
   
    private String logString(CalledFrom calledFrom, LoggingLocation location, PersistenceCapable pojo) {
        final AdapterManager adapterManager = getAdapterManager();
        final ObjectAdapter adapter = adapterManager.getAdapterFor(pojo);
        // initial spaces just to look better in log when wrapped by IsisLifecycleListener...
        return calledFrom.name() + " " + location.prefix + " oid=" + (adapter !=null? adapter.getOid(): "(null)") + " ,pojo " + pojo;
    }
View Full Code Here

            @Override
            public AuthenticationSession getAuthenticationSession() {
                return IsisContext.getAuthenticationSession();
            }
        };
        this.adapterManager = new AdapterManager() {

            @Override
            public ObjectAdapter getAdapterFor(Oid oid) {
                return null;
            }
View Full Code Here

        final ObjectInstantiator objectInstantiator = getRuntimeContext().getObjectInstantiator();

        // create contexts as inputs ...
        final SpecificationContext specContext = new SpecificationContext(getDeploymentCategory(), authenticationSessionProvider, servicesProvider, objectInstantiator, specificationLookup, facetProcessor);

        final AdapterManager adapterMap = getRuntimeContext().getAdapterManager();
        final ObjectMemberContext objectMemberContext = new ObjectMemberContext(getDeploymentCategory(), authenticationSessionProvider, specificationLookup, adapterMap, getRuntimeContext().getQuerySubmitter(), collectionTypeRegistry);

        // ... and create the specs
        if (FreeStandingList.class.isAssignableFrom(cls)) {
            return new ObjectSpecificationForFreeStandingList(specContext, objectMemberContext);
View Full Code Here

        }
    }

    private String logString(Phase phase, LoggingLocation location, InstanceLifecycleEvent event) {
        final PersistenceCapable pojo = Utils.persistenceCapableFor(event);
        final AdapterManager adapterManager = getAdapterManager();
        final ObjectAdapter adapter = adapterManager.getAdapterFor(pojo);
        return phase + " " + location.prefix + " " + LifecycleEventType.lookup(event.getEventType()) + ": oid=" + (adapter !=null? adapter.getOid(): "(null)") + " ,pojo " + pojo;
    }
View Full Code Here

           
        }, calledFrom);
    }
   
    private String logString(CalledFrom calledFrom, LoggingLocation location, PersistenceCapable pojo) {
        final AdapterManager adapterManager = getAdapterManager();
        final ObjectAdapter adapter = adapterManager.getAdapterFor(pojo);
        // initial spaces just to look better in log when wrapped by IsisLifecycleListener...
        return calledFrom.name() + " " + location.prefix + " oid=" + (adapter !=null? adapter.getOid(): "(null)") + " ,pojo " + pojo;
    }
View Full Code Here

TOP

Related Classes of org.apache.isis.core.metamodel.adapter.mgr.AdapterManager

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.