Package org.apache.pluto.om.common

Examples of org.apache.pluto.om.common.ObjectID


        }
    }

    public MutablePortletEntity getPortletEntity( String id )
    {
        ObjectID oid = JetspeedObjectID.createFromString(id);
        return getPortletEntity(oid);
    }
View Full Code Here


        public void killJob(WorkerImpl worker, RenderingJob job) {
            try {
                if (log.isWarnEnabled()) {
                    PortletWindow window = job.getWindow();
                    ObjectID windowId = (null != window ? window.getId() : null);
                    log.warn("Portlet Rendering job to be interrupted by timeout (" + job.getTimeout() + "ms): " + windowId);
                }

                int waitCount = 0;
                PortletContent content = job.getPortletContent();
View Full Code Here

        public void killJob(WorkerImpl worker, RenderingJob job) {
            try {
                if (log.isWarnEnabled()) {
                    PortletWindow window = job.getWindow();
                    ObjectID windowId = (null != window ? window.getId() : null);
                    log.warn("Portlet Rendering job to be interrupted by timeout (" + job.getTimeout() + "ms): " + windowId);
                }

                PortletContent content = job.getPortletContent();
               
View Full Code Here

    public void testSimplePutAndGet()
    {

        PortletWindow window = (PortletWindow) windowMock.proxy();
        Element element = new Element(WINDOW_ID, window);
        ObjectID oid = (ObjectID) oidMock.proxy();
        ObjectID entityOid = (ObjectID) entityOidMock.proxy();
        entityOidMock.expects(atLeastOnce()).method("toString").will(returnValue(ENTITY_ID));
        oidMock.expects(atLeastOnce()).method("toString").will(returnValue(WINDOW_ID));
        windowMock.expects(once()).method("getId").withNoArguments().will(returnValue(oid));
        windowMock.expects(once()).method("getPortletEntity").withNoArguments().will(returnValue(entityMock.proxy()));
        entityMock.expects(once()).method("getId").withNoArguments().will(returnValue(entityOid));
View Full Code Here

    {

        SerializablePortletWindow window = (SerializablePortletWindow) windowMock.proxy();
        Element element = new Element(WINDOW_ID, window);
       
        ObjectID oid = (ObjectID) oidMock.proxy();
        oidMock.expects(atLeastOnce()).method("toString").will(returnValue(WINDOW_ID));
        ObjectID entityOid = (ObjectID) entityOidMock.proxy();
        entityOidMock.expects(atLeastOnce()).method("toString").will(returnValue(ENTITY_ID));
        cacheMock.expects(once()).method("put").with(eq(element));
        cacheMock.expects(once()).method("get").with(eq(WINDOW_ID)).will(returnValue(element));
        windowMock.expects(once()).method("getId").withNoArguments().will(returnValue(oid));
        windowMock.expects(once()).method("getPortletEntity").withNoArguments().will(returnValue(entityMock.proxy()));
View Full Code Here

    public void testRemove()
    {
        SerializablePortletWindow window = (SerializablePortletWindow) windowMock.proxy();
        Element element = new Element(WINDOW_ID, window);
       
        ObjectID oid = (ObjectID) oidMock.proxy();
        oidMock.expects(atLeastOnce()).method("toString").will(returnValue(WINDOW_ID));
       
        ObjectID entityOid = (ObjectID)entityOidMock.proxy();
        entityOidMock.expects(atLeastOnce()).method("toString").will(returnValue(ENTITY_ID));
       
        cacheMock.expects(once()).method("put").with(eq(element));
        cacheMock.expects(exactly(2)).method("get").with(eq(WINDOW_ID)).will(returnValue(element));
        windowMock.expects(once()).method("getId").withNoArguments().will(returnValue(oid));
View Full Code Here

    public void testRemoveByEntityId()
    {
        SerializablePortletWindow window = (SerializablePortletWindow) windowMock.proxy();
        Element element = new Element(WINDOW_ID, window);
       
        ObjectID oid = (ObjectID) oidMock.proxy();
        oidMock.expects(atLeastOnce()).method("toString").will(returnValue(WINDOW_ID));
       
        ObjectID entityOid = (ObjectID) entityOidMock.proxy();
        entityOidMock.expects(atLeastOnce()).method("toString").will(returnValue(ENTITY_ID));
       
        cacheMock.expects(once()).method("put").with(eq(element));
        cacheMock.expects(exactly(3)).method("get").with(eq(WINDOW_ID)).will(onConsecutiveCalls(returnValue(element), returnValue(element), new VoidStub()));
        windowMock.expects(exactly(2)).method("getId").withNoArguments().will(returnValue(oid));
View Full Code Here

            RenderingJob job = jobWork.getRenderingJob();
           
            try {
                if (log.isWarnEnabled()) {
                    PortletWindow window = job.getWindow();
                    ObjectID windowId = (null != window ? window.getId() : null);
                    log.warn("Portlet Rendering job to be interrupted by timeout (" + job.getTimeout() + "ms): " + windowId);
                }

                PortletContent content = job.getPortletContent();
                Thread worker = (Thread) job.getWorkerAttribute(WORKER_THREAD_ATTR);
View Full Code Here

     */
    public MutablePortletEntity generateEntityFromFragment( ContentFragment fragment, String principal )
            throws PortletEntityNotGeneratedException
    {
        PortletDefinition pd = registry.getPortletDefinitionByUniqueName(fragment.getName());
        ObjectID entityKey = generateEntityKey(fragment, principal);
        MutablePortletEntity portletEntity = null;

        if (pd != null)
        {
            portletEntity = newPortletEntityInstance(pd);
            if (portletEntity == null)
            {
                throw new PortletEntityNotGeneratedException("Failed to create Portlet Entity for "
                        + fragment.getName());
            }
        }
        else
        {
            String msg = "Failed to retrieve Portlet Definition for " + fragment.getName();
            logger.warn(msg);
            portletEntity = new PortletEntityImpl(fragment);
            fragment.overrideRenderedContent(msg);
        }

        portletEntity.setId(entityKey.toString());

        return portletEntity;
    }
View Full Code Here

        }
    }

    public MutablePortletEntity getPortletEntity( String id )
    {
        ObjectID oid = JetspeedObjectID.createFromString(id);
        return getPortletEntity(oid);
    }
View Full Code Here

TOP

Related Classes of org.apache.pluto.om.common.ObjectID

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.