Package org.jasig.portal

Examples of org.jasig.portal.ChannelStaticData


        verify(portletDefinitionRegistry, portletDefinition, portletRequestParameterManager, portletEntity, portletEntityRegistry, portletWindow, portletWindowRegistry, person);
    }


    public void testIsCacheValidWindowOverride() throws Exception {
        final ChannelStaticData channelStaticData = new ChannelStaticData();
        channelStaticData.setChannelPublishId("pub1");
        channelStaticData.setChannelSubscribeId("sub1");
       
        final IPerson person = createMock(IPerson.class);
        channelStaticData.setPerson(person);


        final MockHttpServletRequest request = new MockHttpServletRequest();
        final MockHttpServletResponse response = new MockHttpServletResponse();
       
View Full Code Here


    }
   
    public void testRender() throws Exception {
        final IPerson person = createMock(IPerson.class);
       
        final ChannelStaticData channelStaticData = new ChannelStaticData();
        channelStaticData.setChannelPublishId("pub1");
        channelStaticData.setChannelSubscribeId("sub1");
        channelStaticData.setPerson(person);

       
        final MockHttpServletRequest request = new MockHttpServletRequest();
        final MockHttpServletResponse response = new MockHttpServletResponse();
       
View Full Code Here

    public void testGetStaticData() {
        MockXSLTChannel instance = new MockXSLTChannel();
       
        assertNull(instance.getStaticData());
       
        ChannelStaticData sd = new ChannelStaticData();
        instance.setStaticData(sd);
        assertSame(sd, instance.getStaticData());
    }
View Full Code Here

     * @throws PortalException
     */
    public void testRenderXMLNullDocument() throws PortalException {
        try {
            MockXSLTChannel instance = new MockXSLTChannel();
            instance.setStaticData(new ChannelStaticData());
            instance.setRuntimeData(new ChannelRuntimeData());
            instance.renderXML(new DummyContentHandler());
        } catch (IllegalStateException ise) {
            // expected
            return;
View Full Code Here

     */
    public void testRenderXMLGetXmlThrowsRuntimeException() throws PortalException {
        RuntimeException runtimeException = new RuntimeException();
       
        MockXSLTChannel mock = new MockXSLTChannel();
        mock.setStaticData(new ChannelStaticData());
        mock.setRuntimeData(new ChannelRuntimeData());
        mock.setThrownFromGetXml(runtimeException);
       
        try {
            mock.renderXML(new DummyContentHandler());
View Full Code Here

     */
    public void testRenderXMLGetXsltUriThrowsPortalException() throws ParserConfigurationException {
        PortalException portalException = new PortalException();
       
        MockXSLTChannel mock = new MockXSLTChannel();
        mock.setStaticData(new ChannelStaticData());
        mock.setRuntimeData(new ChannelRuntimeData());
        Document blankDoc = DocumentBuilderFactory.newInstance().newDocumentBuilder().newDocument();
        mock.setDocument(blankDoc);
        mock.setThrownFromGetXsltUri(portalException);
       
View Full Code Here

     */
    public void testRenderXMLGetStylesheetParamsThrowsSqlException() throws ParserConfigurationException {
        SQLException sqlException = new SQLException();
       
        MockXSLTChannel mock = new MockXSLTChannel();
        mock.setStaticData(new ChannelStaticData());
        mock.setRuntimeData(new ChannelRuntimeData());
        Document blankDoc = DocumentBuilderFactory.newInstance().newDocumentBuilder().newDocument();
        mock.setDocument(blankDoc);
        mock.setXsltUriString("anxslt.xsl");
        mock.setThrownFromGetStylesheetParams(sqlException);
View Full Code Here

     * @return the ChannelStaticData attribute 'xsltUri' or 'MissingProperties.xsl' if the attribute was null.
     */
    protected String getXsltUri() {
       
        try {
            ChannelStaticData staticData = getStaticData();
            String xsltUri = staticData.getParameter(XSL_PARAM_KEY);
           
            if (xsltUri != null) {
                return xsltUri;
            }
           
View Full Code Here

      }
      // instantiate channel class
      try {
        channel = (org.jasig.portal.IChannel)Class.forName(className).newInstance();
        // construct a ChannelStaticData object
        ChannelStaticData sd = new ChannelStaticData();
        sd.setChannelSubscribeId("singlet");
        sd.setTimeout(timeOut);
        // determine the IPerson object
        IPerson person = PersonFactory.createGuestPerson();
        sd.setPerson(person);
        // todo: determine and pass channel publish/subscribe parameters.
        //        sd.setParameters (params);
        channel.setStaticData(sd);
        initialized = true;
      } catch (Exception e) {
View Full Code Here

        // not a CAS security context
        BrokenSecurityContext brokenContext = new BrokenSecurityContext();
       
        person.setSecurityContext(brokenContext);
       
        ChannelStaticData staticData = new ChannelStaticData();
        staticData.setPerson(person);
       
        CasConnectionContext connectionContext = new CasConnectionContext();
        connectionContext.init(staticData);

        String service = "http://www.someschool.edu/someservice";
View Full Code Here

TOP

Related Classes of org.jasig.portal.ChannelStaticData

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.