Examples of JSEntityPreferences


Examples of org.apache.jetspeed.serializer.objects.JSEntityPreferences

        }
    }

    private void importEntityPref(JSApplication app, JSPortlet portlet, JSEntity entity, PortletDefinition pd, Map settings, Logger log)
    {
        JSEntityPreferences preferences = entity.getEntityPreferences();
        if ((preferences == null) || (preferences.size() == 0))
            return;

        try
        {
            Iterator it = preferences.iterator();
            while (it.hasNext())
            {
                Map<String, PortletPreference> portletPreference = new HashMap<String, PortletPreference>();
                Object preference = it.next();
                String userName = null;
View Full Code Here

Examples of org.apache.jetspeed.serializer.objects.JSEntityPreferences

    JSEntity exportEntityPref(PortletDefinition definition, String windowId, Map settings, Logger log)
    {
        JSEntity jsEntity = null;
        jsEntity = new JSEntity();
        jsEntity.setId(windowId);
        JSEntityPreferences entityPreferences = new JSEntityPreferences();
        Set<String> userNames = prefsProvider.getUserNames(definition, windowId);
        for (String userName : userNames)
        {
            Map<String, PortletPreference> userPreferences = prefsProvider.getUserPreferences(definition, windowId, userName);
            JSEntityPreference userPreference = new JSEntityPreference();
            userPreference.setPrincapalName(userName);
            Iterator<String> preferences = userPreferences.keySet().iterator();
            JSNVPElements v = new JSNVPElements("preference");
            while (preferences.hasNext())
            {
                String pKey = preferences.next();
                PortletPreference portletPreference = userPreferences.get(pKey);
                JSNVPElement element = new JSNVPElement();
                element.setKey(pKey);
                element.setValues(portletPreference.getValues());
                element.setReadOnly(portletPreference.isReadOnly());
                v.add(element);
            }
            if (v.size() > 0)
            {
                userPreference.setPreferences(v);
                entityPreferences.add(userPreference);
            }
            if (!entityPreferences.isEmpty())
            {
                log.debug("processed preferences for entity=" + windowId);
                jsEntity.setEntityPreferences(entityPreferences);
            }
        }
View Full Code Here

Examples of org.apache.jetspeed.serializer.objects.JSEntityPreferences

      Preferences prefNode = Preferences.userRoot().node(rootForEntity);
      String[] children = prefNode.childrenNames();
      if ((children != null) && (children.length > 0))
      {
        JSEntityPreferences permissions = new JSEntityPreferences();

        for (int i = 0; i < children.length; i++)
        {
          JSEntityPreference permission = processPreferenceNode(
              entity, children[i]);
          if (permission != null)
            permissions.add(permission);
        }
        System.out.println("processed preferences for entity="
            + entity.getId());
        jsEntity.setEntityPreferences(permissions);
        return jsEntity;
View Full Code Here

Examples of org.apache.jetspeed.serializer.objects.JSEntityPreferences

  private void importEntityPref(JSEntity entity , MutablePortletEntity portletEntity)
  {

    // do I carry any preferences?
    JSEntityPreferences preferences = entity.getEntityPreferences();
    if ((preferences == null) || (preferences.size() == 0))
      return;
   
   
    //since I do have preferences let us make sure we have a root node
   
    String rootForEntity = MutablePortletEntity.PORTLET_ENTITY_ROOT + "/"
        + portletEntity.getId();
    try
    {
      Preferences.userRoot().node(rootForEntity); // will create it if it doesn't exist
     
     
      Iterator it = preferences.iterator();
      while (it.hasNext())
      {
        JSEntityPreference preference = (JSEntityPreference)it.next();
       
        // do we have preferences for this one?
View Full Code Here

Examples of org.apache.jetspeed.serializer.objects.JSEntityPreferences

      Preferences prefNode = Preferences.userRoot().node(rootForEntity);
      String[] children = prefNode.childrenNames();
      if ((children != null) && (children.length > 0))
      {
        JSEntityPreferences permissions = new JSEntityPreferences();

        for (int i = 0; i < children.length; i++)
        {
          JSEntityPreference permission = processPreferenceNode(
              entity, children[i]);
          if (permission != null)
            permissions.add(permission);
        }
        System.out.println("processed preferences for entity="
            + entity.getId());
        jsEntity.setEntityPreferences(permissions);
        return jsEntity;
View Full Code Here

Examples of org.apache.jetspeed.serializer.objects.JSEntityPreferences

  private void importEntityPref(JSEntity entity , MutablePortletEntity portletEntity)
  {

    // do I carry any preferences?
    JSEntityPreferences preferences = entity.getEntityPreferences();
    if ((preferences == null) || (preferences.size() == 0))
      return;
   
   
    //since I do have preferences let us make sure we have a root node
   
    String rootForEntity = MutablePortletEntity.PORTLET_ENTITY_ROOT + "/"
        + portletEntity.getId();
    try
    {
      Preferences.userRoot().node(rootForEntity); // will create it if it doesn't exist
     
     
      Iterator it = preferences.iterator();
      while (it.hasNext())
      {
        JSEntityPreference preference = (JSEntityPreference)it.next();
       
        // do we have preferences for this one?
View Full Code Here

Examples of org.apache.jetspeed.serializer.objects.JSEntityPreferences

      Preferences prefNode = Preferences.userRoot().node(rootForEntity);
      String[] children = prefNode.childrenNames();
      if ((children != null) && (children.length > 0))
      {
        JSEntityPreferences permissions = new JSEntityPreferences();

        for (int i = 0; i < children.length; i++)
        {
          JSEntityPreference permission = processPreferenceNode(
              entity, children[i]);
          if (permission != null)
            permissions.add(permission);
        }
        jsEntity.setEntityPreferences(permissions);
        return jsEntity;
        // processPreferenceNode(entity,prefNode,null);
      }
View Full Code Here

Examples of org.apache.jetspeed.serializer.objects.JSEntityPreferences

  private void importEntityPref(JSEntity entity, MutablePortletEntity portletEntity)
  {

    // do I carry any preferences?
    JSEntityPreferences preferences = entity.getEntityPreferences();
    if ((preferences == null) || (preferences.size() == 0))
      return;
   
   
    //since I do have preferences let us make sure we have a root node
    String entityId = ((portletEntity != null) ? portletEntity.getId().toString() : entity.getId().toString());
    String rootForEntity = MutablePortletEntity.PORTLET_ENTITY_ROOT + "/"
        + entityId;
    try
    {
      Preferences.userRoot().node(rootForEntity); // will create it if it doesn't exist
     
     
      Iterator it = preferences.iterator();
      while (it.hasNext())
      {
        JSEntityPreference preference = (JSEntityPreference)it.next();
       
        // do we have preferences for this one?
View Full Code Here

Examples of org.apache.jetspeed.serializer.objects.JSEntityPreferences

      Preferences prefNode = Preferences.userRoot().node(rootForEntity);
      String[] children = prefNode.childrenNames();
      if ((children != null) && (children.length > 0))
      {
        JSEntityPreferences permissions = new JSEntityPreferences();

        for (int i = 0; i < children.length; i++)
        {
          JSEntityPreference permission = processPreferenceNode(
              entity, children[i]);
          if (permission != null)
            permissions.add(permission);
        }
        System.out.println("processed preferences for entity="
            + entity.getId());
        jsEntity.setEntityPreferences(permissions);
        return jsEntity;
View Full Code Here

Examples of org.apache.jetspeed.serializer.objects.JSEntityPreferences

  private void importEntityPref(JSEntity entity , MutablePortletEntity portletEntity)
  {

    // do I carry any preferences?
    JSEntityPreferences preferences = entity.getEntityPreferences();
    if ((preferences == null) || (preferences.size() == 0))
      return;
   
   
    //since I do have preferences let us make sure we have a root node
   
    String rootForEntity = MutablePortletEntity.PORTLET_ENTITY_ROOT + "/"
        + portletEntity.getId();
    try
    {
      Preferences prefNode = Preferences.userRoot().node(rootForEntity); // will create it if it doesn't exist
     
     
      Iterator it = preferences.iterator();
      while (it.hasNext())
      {
        JSEntityPreference preference = (JSEntityPreference)it.next();
       
        // do we have preferences for this one?
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.