Examples of IUserLayoutStore


Examples of org.jasig.portal.layout.IUserLayoutStore

        boolean isChannel=false;
        IUserLayoutNodeDescription parent=this.getNode(parentId);
        if( canAddNode( node, parent, nextSiblingId ) )
        {
            // assign new Id
            IUserLayoutStore layoutStore = getLayoutStore();

            if(layoutStore==null) {
                throw new PortalException("Store implementation has not been set for "
                    + owner.getAttribute(IPerson.USERNAME) + ".");
            } else {
                try {
                    if(node instanceof IUserLayoutChannelDescription) {
                        isChannel=true;
                        node.setId(layoutStore.generateNewChannelSubscribeId(owner));
                    } else {
                        node.setId(layoutStore.generateNewFolderId(owner));
                    }
                } catch (Exception e) {
                    throw new PortalException("Exception encountered while " +
                            "generating new user layout node Id for  for "
                            + owner.getAttribute(IPerson.USERNAME));
View Full Code Here

Examples of org.jasig.portal.layout.IUserLayoutStore

            }
        } else  if (stylesheetURI == null || stylesheetDescriptionURI == null) {
            printHelp();
            return;
        }
        IUserLayoutStore ulsdb = UserLayoutStoreFactory.getUserLayoutStoreImpl();
        try {
            if (update) {
                if (isTheme) {
                    ulsdb.updateThemeStylesheetDescription(stylesheetDescriptionURI, stylesheetURI, stylesheetId);
                } else {
                    ulsdb.updateStructureStylesheetDescription(stylesheetDescriptionURI, stylesheetURI, stylesheetId);
                }
                // verify
                if (isTheme) {
                    ThemeStylesheetDescription tsd = UserLayoutStoreFactory.getUserLayoutStoreImpl().getThemeStylesheetDescription(stylesheetId);
                } else {
                    StructureStylesheetDescription ssd = UserLayoutStoreFactory.getUserLayoutStoreImpl().getStructureStylesheetDescription(stylesheetId);
                }
            } else if (delete) {
                if (isTheme) {
                    ulsdb.removeThemeStylesheetDescription(stylesheetId);
                } else {
                    ulsdb.removeStructureStylesheetDescription(stylesheetId);
                }
            } else {
                Integer id = null;
                if (isTheme) {
                    id = ulsdb.addThemeStylesheetDescription(stylesheetDescriptionURI, stylesheetURI);
                } else {
                    id = ulsdb.addStructureStylesheetDescription(stylesheetDescriptionURI, stylesheetURI);
                }

                if (id == null) {
                    System.out.println("Save failed!");
                    return;
View Full Code Here

Examples of org.jasig.portal.layout.IUserLayoutStore

    static final String configXSL="/properties/al/FragmentLoader.xsl";

    public static void main(String[] args) throws Exception {
        RDBMServices.setGetDatasourceFromJndi(false); /*don't try jndi when not in web app */       
        IUserLayoutStore layoutStoreImpl = UserLayoutStoreFactory.getUserLayoutStoreImpl();
        if ( layoutStoreImpl != null && !(layoutStoreImpl instanceof IAggregatedUserLayoutStore) )
        {
            System.out.println("Configured UserLayoutStore is: ");
            System.out.println("  " + layoutStoreImpl.getClass().getName());
            System.out.println("This step requires use of:");
            System.out.println("  " + IAggregatedUserLayoutStore.class.getName());
            System.out.println();
            System.out.println(">>>> Skipping this step.");
            System.exit(0);
View Full Code Here

Examples of org.jasig.portal.layout.IUserLayoutStore

     */
    private static RDBMDistributedLayoutStore getDLS()
    {
        if ( dls == null )
        {
            IUserLayoutStore uls = null;
            uls = UserLayoutStoreFactory.getUserLayoutStoreImpl();
            dls = (RDBMDistributedLayoutStore) uls;
        }
        return dls;
    }
View Full Code Here

Examples of org.jasig.portal.layout.IUserLayoutStore

        public ConfigFilter(ContentHandler ch,Map rMap) throws PortalException {
            super(ch);
            this.rMap=rMap;
            fragmentIds = new HashMap();
            if ( layoutStore == null ) {
             IUserLayoutStore layoutStoreImpl = UserLayoutStoreFactory.getUserLayoutStoreImpl();
             if ( layoutStoreImpl == null || !(layoutStoreImpl instanceof IAggregatedUserLayoutStore) )
              throw new PortalException ( "The user layout store is NULL or must implement IAggregatedUserLayoutStore!" );
             layoutStore =  (IAggregatedUserLayoutStore) layoutStoreImpl;
            }
            if ( channelStore == null )
View Full Code Here

Examples of org.jasig.portal.layout.IUserLayoutStore

                Constants.LCL_MOVE_ALLOWED);
       
        String ID = plfNode.getAttribute( Constants.ATT_ID );
        plfNode.setIdAttribute(Constants.ATT_ID, true);

        IUserLayoutStore uls = null;
        uls = UserLayoutStoreLocator.getUserLayoutStore();
       
        if ( plfNode.getAttribute( Constants.ATT_PLF_ID ).equals( "" ) )
        {
            String plfID = null;
               
            try
            {
                if ( ! plfNode.getAttribute( Constants.ATT_CHANNEL_ID )
                     .equals( "" ) ) // dealing with a channel
                    plfID = uls.generateNewChannelSubscribeId( person );
                else
                    plfID = uls.generateNewFolderId( person );
            }
            catch (Exception e)
            {
                throw new PortalException( "Exception encountered while " +
                                           "generating new user layout node " +
View Full Code Here

Examples of org.jasig.portal.layout.IUserLayoutStore

        {
            // if unparsable default to lowest priority.
            return;
        }
               
        final IUserLayoutStore dls = UserLayoutStoreLocator.getUserLayoutStore();
               
        this.precedence = dls.getFragmentPrecedence( fragmentIndex );
        this.index = fragmentIndex;
    }
View Full Code Here

Examples of org.jasig.portal.layout.IUserLayoutStore

    /* (non-Javadoc)
     * @see org.danann.cernunnos.Phrase#evaluate(org.danann.cernunnos.TaskRequest, org.danann.cernunnos.TaskResponse)
     */
    public void perform(TaskRequest req, TaskResponse res) {
        final Element rootElement = (Element) entityElement.evaluate(req, res);
        final IUserLayoutStore rdbmdls = (IUserLayoutStore) layoutStore.evaluate(req, res);
        SupportedFileTypes y = SupportedFileTypes.getApplicableFileType(rootElement, rdbmdls);
        String entityFileName = y.getSafeFileNameWithExtension(rootElement);
        ReturnValue rslt = (ReturnValue) req.getAttribute(Attributes.RETURN_VALUE);
        rslt.setValue(entityFileName);
    }
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.