Package org.apache.jetspeed.services.psmlmanager.db

Examples of org.apache.jetspeed.services.psmlmanager.db.DatabasePsmlManager


    private void doInsertOrUpdate(Profile profile, int operation, Connection connection)
                         throws Exception
    {
        JetspeedUserProfile userProfile = new JetspeedUserProfile();
        DatabasePsmlManager service = (DatabasePsmlManager)PsmlManager.getService();

        userProfile.setUserName(profile.getUser().getUserName());
        userProfile.setMediaType(profile.getMediaType());
       
        String language = profile.getLanguage();
        if(language != null && (!language.equals("-1")))
        {
      userProfile.setLanguage(language);
        }
        else
        {
          userProfile.setLanguage(null);
        }
       
        String country = profile.getCountry();
        if(country != null && (!country.equals("-1")))
        {
      userProfile.setCountry(country);
        }
        else
        {
          userProfile.setCountry(null);
        }

       
        String name = profile.getName();
        if (name == null || name.equals(""))
        {
            profile.setName(Profiler.FULL_DEFAULT_PROFILE);
        }
        else if (!name.endsWith(Profiler.DEFAULT_EXTENSION))
        {
            profile.setName(name + Profiler.DEFAULT_EXTENSION);
        }
        userProfile.setPage(profile.getName());
        userProfile.setProfile(DBUtils.portletsToBytes(
                                        profile.getDocument().getPortlets(), service.getMapping()));

        if (operation == INSERT)
        {
            super.doInsert(userProfile, connection);
        }
View Full Code Here


    private void doInsertOrUpdate(Profile profile, int operation, Connection connection)
                           throws Exception
    {
        JetspeedGroupProfile groupProfile = new JetspeedGroupProfile();
        DatabasePsmlManager service = (DatabasePsmlManager)PsmlManager.getService();

        groupProfile.setGroupName(profile.getGroup().getName());
        groupProfile.setMediaType(profile.getMediaType());
       
    String language = profile.getLanguage();
    if(language != null && (!language.equals("-1")))
    {
      groupProfile.setLanguage(language);
    }
    else
    {
      groupProfile.setLanguage(null);
    }

    String country = profile.getCountry();
    if(country != null && (!country.equals("-1")))
    {
      groupProfile.setCountry(country);
    }
    else
    {
      groupProfile.setCountry(null);
    }
        String name = profile.getName();
        if (name == null || name.equals(""))
        {
            profile.setName(Profiler.FULL_DEFAULT_PROFILE);
        }
        else if (!name.endsWith(Profiler.DEFAULT_EXTENSION))
        {
            profile.setName(name + Profiler.DEFAULT_EXTENSION);
        }
        groupProfile.setPage(profile.getName());
        groupProfile.setProfile(DBUtils.portletsToBytes(
                                        profile.getDocument().getPortlets(), service.getMapping()));

        if (operation == INSERT)
        {
            super.doInsert(groupProfile, connection);
        }
View Full Code Here

    private void doInsertOrUpdate(Profile profile, int operation, Connection connection)
                           throws Exception
    {
        JetspeedRoleProfile roleProfile = new JetspeedRoleProfile();
        DatabasePsmlManager service = (DatabasePsmlManager)PsmlManager.getService();

        roleProfile.setRoleName(profile.getRole().getName());
        roleProfile.setMediaType(profile.getMediaType());
       
    String language = profile.getLanguage();
    if(language != null && (!language.equals("-1")))
    {
      roleProfile.setLanguage(language);
    }
    else
    {
      roleProfile.setLanguage(null);
    }

    String country = profile.getCountry();
    if(country != null && (!country.equals("-1")))
    {
      roleProfile.setCountry(country);
    }
    else
    {
      roleProfile.setCountry(null);
    }

        String name = profile.getName();
        if (name == null || name.equals(""))
        {
            profile.setName(Profiler.FULL_DEFAULT_PROFILE);
        }
        else if (!name.endsWith(Profiler.DEFAULT_EXTENSION))
        {
            profile.setName(name + Profiler.DEFAULT_EXTENSION);
        }
        roleProfile.setPage(profile.getName());
        roleProfile.setProfile(DBUtils.portletsToBytes(
                                       profile.getDocument().getPortlets(), service.getMapping()));

        if (operation == INSERT)
        {
            super.doInsert(roleProfile, connection);
        }
View Full Code Here

    private void doInsertOrUpdate(Profile profile, int operation, Connection connection)
                         throws Exception
    {
        JetspeedUserProfile userProfile = new JetspeedUserProfile();
        DatabasePsmlManager service = (DatabasePsmlManager)PsmlManager.getService();

        userProfile.setUserName(profile.getUser().getUserName());
        userProfile.setMediaType(profile.getMediaType());
       
        String language = profile.getLanguage();
        if(language != null && (!language.equals("-1")))
        {
      userProfile.setLanguage(language);
        }
        else
        {
          userProfile.setLanguage(null);
        }
       
        String country = profile.getCountry();
        if(country != null && (!country.equals("-1")))
        {
      userProfile.setCountry(country);
        }
        else
        {
          userProfile.setCountry(null);
        }

       
        String name = profile.getName();
        if (name == null || name.equals(""))
        {
            profile.setName(Profiler.FULL_DEFAULT_PROFILE);
        }
        else if (!name.endsWith(Profiler.DEFAULT_EXTENSION))
        {
            profile.setName(name + Profiler.DEFAULT_EXTENSION);
        }
        userProfile.setPage(profile.getName());
        userProfile.setProfile(DBUtils.portletsToBytes(
                                        profile.getDocument().getPortlets(), service.getMapping()));

        if (operation == INSERT)
        {
            super.doInsert(userProfile, connection);
        }
View Full Code Here

    private void doInsertOrUpdate(Profile profile, int operation, Connection connection)
                           throws Exception
    {
        JetspeedGroupProfile groupProfile = new JetspeedGroupProfile();
        DatabasePsmlManager service = (DatabasePsmlManager)PsmlManager.getService();

        groupProfile.setGroupName(profile.getGroup().getName());
        groupProfile.setMediaType(profile.getMediaType());
       
    String language = profile.getLanguage();
    if(language != null && (!language.equals("-1")))
    {
      groupProfile.setLanguage(language);
    }
    else
    {
      groupProfile.setLanguage(null);
    }

    String country = profile.getCountry();
    if(country != null && (!country.equals("-1")))
    {
      groupProfile.setCountry(country);
    }
    else
    {
      groupProfile.setCountry(null);
    }
        String name = profile.getName();
        if (name == null || name.equals(""))
        {
            profile.setName(Profiler.FULL_DEFAULT_PROFILE);
        }
        else if (!name.endsWith(Profiler.DEFAULT_EXTENSION))
        {
            profile.setName(name + Profiler.DEFAULT_EXTENSION);
        }
        groupProfile.setPage(profile.getName());
        groupProfile.setProfile(DBUtils.portletsToBytes(
                                        profile.getDocument().getPortlets(), service.getMapping()));

        if (operation == INSERT)
        {
            super.doInsert(groupProfile, connection);
        }
View Full Code Here

    private void doInsertOrUpdate(Profile profile, int operation, Connection connection)
                           throws Exception
    {
        JetspeedRoleProfile roleProfile = new JetspeedRoleProfile();
        DatabasePsmlManager service = (DatabasePsmlManager)PsmlManager.getService();

        roleProfile.setRoleName(profile.getRole().getName());
        roleProfile.setMediaType(profile.getMediaType());
       
    String language = profile.getLanguage();
    if(language != null && (!language.equals("-1")))
    {
      roleProfile.setLanguage(language);
    }
    else
    {
      roleProfile.setLanguage(null);
    }

    String country = profile.getCountry();
    if(country != null && (!country.equals("-1")))
    {
      roleProfile.setCountry(country);
    }
    else
    {
      roleProfile.setCountry(null);
    }

        String name = profile.getName();
        if (name == null || name.equals(""))
        {
            profile.setName(Profiler.FULL_DEFAULT_PROFILE);
        }
        else if (!name.endsWith(Profiler.DEFAULT_EXTENSION))
        {
            profile.setName(name + Profiler.DEFAULT_EXTENSION);
        }
        roleProfile.setPage(profile.getName());
        roleProfile.setProfile(DBUtils.portletsToBytes(
                                       profile.getDocument().getPortlets(), service.getMapping()));

        if (operation == INSERT)
        {
            super.doInsert(roleProfile, connection);
        }
View Full Code Here

    private void doInsertOrUpdate(Profile profile, int operation, Connection connection)
                         throws Exception
    {
        JetspeedUserProfile userProfile = new JetspeedUserProfile();
        DatabasePsmlManager service = (DatabasePsmlManager)PsmlManager.getService();

        userProfile.setUserName(profile.getUser().getUserName());
        userProfile.setMediaType(profile.getMediaType());
       
        String language = profile.getLanguage();
        if(language != null && (!language.equals("-1")))
        {
      userProfile.setLanguage(language);
        }
        else
        {
          userProfile.setLanguage(null);
        }
       
        String country = profile.getCountry();
        if(country != null && (!country.equals("-1")))
        {
      userProfile.setCountry(country);
        }
        else
        {
          userProfile.setCountry(null);
        }

       
        String name = profile.getName();
        if (name == null || name.equals(""))
        {
            profile.setName(Profiler.FULL_DEFAULT_PROFILE);
        }
        else if (!name.endsWith(Profiler.DEFAULT_EXTENSION))
        {
            profile.setName(name + Profiler.DEFAULT_EXTENSION);
        }
        userProfile.setPage(profile.getName());
        userProfile.setProfile(DBUtils.portletsToBytes(
                                        profile.getDocument().getPortlets(), service.getMapping()));

        if (operation == INSERT)
        {
            super.doInsert(userProfile, connection);
        }
View Full Code Here

    private void doInsertOrUpdate(Profile profile, int operation, Connection connection)
                           throws Exception
    {
        JetspeedRoleProfile roleProfile = new JetspeedRoleProfile();
        DatabasePsmlManager service = (DatabasePsmlManager)PsmlManager.getService();

        roleProfile.setRoleName(profile.getRole().getName());
        roleProfile.setMediaType(profile.getMediaType());
       
    String language = profile.getLanguage();
    if(language != null && (!language.equals("-1")))
    {
      roleProfile.setLanguage(language);
    }
    else
    {
      roleProfile.setLanguage(null);
    }

    String country = profile.getCountry();
    if(country != null && (!country.equals("-1")))
    {
      roleProfile.setCountry(country);
    }
    else
    {
      roleProfile.setCountry(null);
    }

        String name = profile.getName();
        if (name == null || name.equals(""))
        {
            profile.setName(Profiler.FULL_DEFAULT_PROFILE);
        }
        else if (!name.endsWith(Profiler.DEFAULT_EXTENSION))
        {
            profile.setName(name + Profiler.DEFAULT_EXTENSION);
        }
        roleProfile.setPage(profile.getName());
        roleProfile.setProfile(DBUtils.portletsToBytes(
                                       profile.getDocument().getPortlets(), service.getMapping()));

        if (operation == INSERT)
        {
            super.doInsert(roleProfile, connection);
        }
View Full Code Here

    private void doInsertOrUpdate(Profile profile, int operation, Connection connection)
                           throws Exception
    {
        JetspeedGroupProfile groupProfile = new JetspeedGroupProfile();
        DatabasePsmlManager service = (DatabasePsmlManager)PsmlManager.getService();

        groupProfile.setGroupName(profile.getGroup().getName());
        groupProfile.setMediaType(profile.getMediaType());
       
    String language = profile.getLanguage();
    if(language != null && (!language.equals("-1")))
    {
      groupProfile.setLanguage(language);
    }
    else
    {
      groupProfile.setLanguage(null);
    }

    String country = profile.getCountry();
    if(country != null && (!country.equals("-1")))
    {
      groupProfile.setCountry(country);
    }
    else
    {
      groupProfile.setCountry(null);
    }
        String name = profile.getName();
        if (name == null || name.equals(""))
        {
            profile.setName(Profiler.FULL_DEFAULT_PROFILE);
        }
        else if (!name.endsWith(Profiler.DEFAULT_EXTENSION))
        {
            profile.setName(name + Profiler.DEFAULT_EXTENSION);
        }
        groupProfile.setPage(profile.getName());
        groupProfile.setProfile(DBUtils.portletsToBytes(
                                        profile.getDocument().getPortlets(), service.getMapping()));

        if (operation == INSERT)
        {
            super.doInsert(groupProfile, connection);
        }
View Full Code Here

TOP

Related Classes of org.apache.jetspeed.services.psmlmanager.db.DatabasePsmlManager

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.