Package org.apache.jetspeed.serializer

Examples of org.apache.jetspeed.serializer.JetspeedSerializer


                    Boolean.TRUE);
            settings.put(JetspeedSerializer.KEY_OVERWRITE_EXISTING,
                    Boolean.TRUE);
            settings.put(JetspeedSerializer.KEY_BACKUP_BEFORE_PROCESS,
                    Boolean.FALSE);
            JetspeedSerializer serializer = serializerFactory.create(JetspeedSerializerFactory.PRIMARY);
            try
            {
                serializer.importData(filePath, settings);
            }
            catch (Exception e)
            {
                serializer = serializerFactory.create(JetspeedSerializerFactory.SECONDARY);
                serializer.importData(filePath, settings);               
            }
            return true;
        }
        catch (Exception e)
        {
View Full Code Here


                    Boolean.TRUE);
            settings.put(JetspeedSerializer.KEY_OVERWRITE_EXISTING,
                    Boolean.TRUE);
            settings.put(JetspeedSerializer.KEY_BACKUP_BEFORE_PROCESS,
                    Boolean.FALSE);
            JetspeedSerializer serializer = serializerFactory.create(JetspeedSerializerFactory.PRIMARY);
            try
            {
                serializer.importData(filePath, settings);
            }
            catch (Exception e)
            {
                serializer = serializerFactory.create(JetspeedSerializerFactory.SECONDARY);
                serializer.importData(filePath, settings);               
            }
            return true;
        }
        catch (Exception e)
        {
View Full Code Here

            }
            settings.put(JetspeedSerializer.KEY_OVERWRITE_EXISTING,
                    Boolean.TRUE);
            settings.put(JetspeedSerializer.KEY_BACKUP_BEFORE_PROCESS,
                    Boolean.FALSE);
            JetspeedSerializer serializer = null;
            if (processPrefs)
                serializer = serializerFactory.create(JetspeedSerializerFactory.SECONDARY);
            else
                serializer = serializerFactory.create(JetspeedSerializerFactory.PRIMARY);
            serializer.setDefaultIndent("\t");
            serializer.exportData("jetspeedadmin_export_process", exportFileName, settings);
            requestContext.getRequest().getSession().setAttribute("file", userName + "_ldapExport.xml");
            resultMap.put("link", getDownloadLink(requestContext, "tmpExport.xml", userName));

            resultMap.put(STATUS, status);
        } catch (Exception e)
View Full Code Here

            }
            settings.put(JetspeedSerializer.KEY_OVERWRITE_EXISTING,
                    Boolean.TRUE);
            settings.put(JetspeedSerializer.KEY_BACKUP_BEFORE_PROCESS,
                    Boolean.FALSE);
            JetspeedSerializer serializer = null;
            if (processPrefs)
                serializer = serializerFactory.create(JetspeedSerializerFactory.SECONDARY);
            else
                serializer = serializerFactory.create(JetspeedSerializerFactory.PRIMARY);
            serializer.setDefaultIndent("\t");
            serializer.exportData("jetspeedadmin_export_process", exportFileName, settings);
            requestContext.getRequest().getSession().setAttribute("file", userName + "_ldapExport.xml");
            resultMap.put("link", getDownloadLink(requestContext, "tmpExport.xml", userName));

            resultMap.put(STATUS, status);
        } catch (Exception e)
View Full Code Here

            }
            Thread.currentThread().setContextClassLoader(extendedClassLoader);
           
            scm = new SpringComponentManager(filter, bootConfig, appConfig, applicationRootPath, initProperties, true);
            scm.start();
            JetspeedSerializer serializer = (JetspeedSerializer)scm.getComponent(JetspeedSerializer.class.getName());
            HashMap settings = new HashMap();
            settings.put(JetspeedSerializer.KEY_LOGGER, logger);
            if (seedFiles != null)
            {
                for (int i = 0; i < seedFiles.length; i++)
                {
                    serializer.importData(seedFiles[i], settings);
                }
            }
        }
        catch (Exception e)
        {
View Full Code Here

            }
            Thread.currentThread().setContextClassLoader(extendedClassLoader);
           
            scm = new SpringComponentManager(filter, bootConfig, appConfig, applicationRootPath, true);
            scm.start();
            JetspeedSerializer serializer = (JetspeedSerializer)scm.getComponent(JetspeedSerializer.class.getName());
            HashMap settings = new HashMap();
            settings.put(JetspeedSerializer.KEY_LOGGER, logger);
            if (exportFile != null)
            {
                if (exportName == null)
                {
                    exportName = JetspeedSerializer.TAG_SNAPSHOT;
                }
                serializer.exportData(exportName, exportFile, settings);
            }
            scm.stop();
        }
        catch (Exception e)
        {
View Full Code Here

   
    public void firstTestSetup() throws Exception
    {
        System.out.println("firstTestSetup");
        JetspeedSerializer serializer = (JetspeedSerializer)scm.getComponent("JetspeedSerializer");
        serializer.deleteData();
        serializer.importData(getBaseDir()+"target/test-classes/j2-seed.xml");
    }
View Full Code Here

    }
   
    public void lastTestTeardown() throws Exception
    {
        System.out.println("lastTestTeardown");
        JetspeedSerializer serializer = (JetspeedSerializer)scm.getComponent("JetspeedSerializer");
        serializer.deleteData();
    }
View Full Code Here

    }

    public void firstTestSetup() throws Exception
    {
        System.out.println("firstTestSetup");
        JetspeedSerializer serializer = (JetspeedSerializer)scm.getComponent("serializer");
        serializer.deleteData();
        serializer.importData(getBaseDir()+"target/test-classes/j2-seed.xml");
    }
View Full Code Here

    }

    public void lastTestTeardown() throws Exception
    {
        System.out.println("lastTestTeardown");
        JetspeedSerializer serializer = (JetspeedSerializer)scm.getComponent("serializer");
        serializer.deleteData();
    }
View Full Code Here

TOP

Related Classes of org.apache.jetspeed.serializer.JetspeedSerializer

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.