Examples of InfoGluePrincipal


Examples of org.infoglue.cms.security.InfoGluePrincipal

      if(userNames != null)
      {
        for(int i=0; i<userNames.length; i++)
        {
          String userName = userNames[i];
          InfoGluePrincipal principal = UserControllerProxy.getController().getUser(userName);
          if(usersAddresses.indexOf(principal.getEmail()) == -1)
          {
            if(usersAddresses.length() > 0)
              usersAddresses += ";";
           
            usersAddresses += principal.getEmail();
          }
        }
      }
     
      if(roleNames != null)
      {
        for(int i=0; i<roleNames.length; i++)
        {
          String roleName = roleNames[i];
         
          List principals = RoleControllerProxy.getController().getInfoGluePrincipals(roleName);
          Iterator principalsIterator = principals.iterator();
          while(principalsIterator.hasNext())
          {
            InfoGluePrincipal principal = (InfoGluePrincipal)principalsIterator.next();
            if(usersAddresses.indexOf(principal.getEmail()) == -1)
            {
              if(usersAddresses.length() > 0)
                usersAddresses += ";";
             
              usersAddresses += principal.getEmail();
            }
          }
        }
      }
     
      if(groupNames != null)
      { 
        for(int i=0; i<groupNames.length; i++)
        {
          String groupName = groupNames[i];
         
          List principals = GroupControllerProxy.getController().getInfoGluePrincipals(groupName);
          Iterator principalsIterator = principals.iterator();
          while(principalsIterator.hasNext())
          {
            InfoGluePrincipal principal = (InfoGluePrincipal)principalsIterator.next();
            if(usersAddresses.indexOf(principal.getEmail()) == -1)
            {
              if(usersAddresses.length() > 0)
                usersAddresses += ";";
             
              usersAddresses += principal.getEmail();
            }
          }
        }
      }
     
View Full Code Here

Examples of org.infoglue.cms.security.InfoGluePrincipal

     
    String value = "";
   
    try
    {
        InfoGluePrincipal infoGluePrincipal = this.getInfoGluePrincipal();
        LanguageVO languageVO = (LanguageVO)LanguageController.getController().getLanguageVOList().get(0);
        value = InfoGluePrincipalControllerProxy.getController().getPrincipalPropertyValue(infoGluePrincipal, propertyName, languageVO.getId(), null, false, escapeSpecialCharacters, findLargestValue, findPrioValue);
    }
    catch(Exception e)
    {
View Full Code Here

Examples of org.infoglue.cms.security.InfoGluePrincipal

  {
    Map value = new HashMap();
   
    try
    {
        InfoGluePrincipal infoGluePrincipal = this.getInfoGluePrincipal();
        LanguageVO languageVO = (LanguageVO)LanguageController.getController().getLanguageVOList().get(0);
      value = InfoGluePrincipalControllerProxy.getController().getPrincipalPropertyHashValues(infoGluePrincipal, propertyName, languageVO.getId(), null, false, escapeSpecialCharacters);
    }
    catch(Exception e)
    {
View Full Code Here

Examples of org.infoglue.cms.security.InfoGluePrincipal

    }
  }

  public static InfoGluePrincipal getSessionInfoGluePrincipal()
  {
    InfoGluePrincipal infoGluePrincipal = null;
    try
    {
      if(ActionContext.getRequest() != null && ActionContext.getRequest().getSession() != null)
        infoGluePrincipal = (InfoGluePrincipal)ActionContext.getRequest().getSession().getAttribute("org.infoglue.cms.security.user");
    }
View Full Code Here

Examples of org.infoglue.cms.security.InfoGluePrincipal

      {
        if (logger.isInfoEnabled())
        {
          logger.info("Found RedirectVO when populating redirect suggestions. SiteNodeId: " + redirectVO.getSiteNodeId() + ", URL: " + request.getRequestURL().toString() + ", RedirectId: " + redirectVO.getRedirectId());
        }
        InfoGluePrincipal infoGluePrincipal = (InfoGluePrincipal) request.getSession().getAttribute("infogluePrincipal");
        String redirectUrl = getUrlFromRedirect(redirectVO, infoGluePrincipal);
        logger.debug("RedirectURL before remaining append: " + redirectUrl);
        redirectUrl = redirectUrl + remainingUrlPart;
        logger.debug("RedirectURL after remaining append: " + redirectUrl);
        request.setAttribute(REDIRECT_SUGGESTION, redirectUrl);
View Full Code Here

Examples of org.infoglue.cms.security.InfoGluePrincipal

     
      logger.info("docs:" + docs.size());
      for(Document doc : docs)
      {
        String userName = doc.get("userName");
        InfoGluePrincipal user = new InfoGluePrincipal(userName, doc.get("userName"), doc.get("firstName"), doc.get("lastName"), doc.get("email"), doc.get("source"), true, new Date(), new ArrayList(), new ArrayList(), new HashMap(), false, null);
        users.add(user);
      }
    }
    catch (Exception e)
    {
View Full Code Here

Examples of org.infoglue.cms.security.InfoGluePrincipal

     
        if(logger.isInfoEnabled())
          {
            logger.info("principalName:" + principalName);
          }
      InfoGluePrincipal principal = UserControllerProxy.getController().getUser(principalName);

        List missingRemoteComponents = (List)arguments.get("missingComponents");
            logger.info("missingRemoteComponents:" + missingRemoteComponents);
                   
      Iterator missingRemoteComponentsIterator = missingRemoteComponents.iterator();
      while(missingRemoteComponentsIterator.hasNext())
      {
        ContentVO missingRemoteContentVO = (ContentVO)missingRemoteComponentsIterator.next();
        if(missingRemoteContentVO != null)
          missingRemoteContentVO.setIsBranch(Boolean.FALSE);
       
        logger.info("missingRemoteContentVO:" + missingRemoteContentVO + ":" + missingRemoteContentVO.getFullPath());
        String fullPath = missingRemoteContentVO.getFullPath();
        logger.info("fullPath:" + fullPath);
        int siteNodeEnd = fullPath.indexOf(" - /");
        String repositoryString = fullPath.substring(0, siteNodeEnd);
        String restString = fullPath.substring(siteNodeEnd + 4);
        restString = restString.substring(0, restString.lastIndexOf("/"));
       
        if(restString.indexOf("/") > -1)
            restString = restString.substring(restString.indexOf("/") + 1);
        else
          restString = "";
       
        logger.info("repositoryString:" + repositoryString);
        logger.info("restString:" + restString);
        try
        {
          RepositoryVO repositoryVO = RepositoryController.getController().getRepositoryVOWithName(repositoryString);
          logger.info("repositoryVO:" + repositoryVO);
         
          if(repositoryVO == null && components != null && components.size() > 0)
          {
            ContentVO contentVO = (ContentVO)components.get(0);
            repositoryVO = RepositoryController.getController().getRepositoryVOWithId(contentVO.getRepositoryId());
            logger.info("repositoryVO:" + repositoryVO);
          }
         
          if(repositoryVO != null)
          {
            LanguageVO languageVO = LanguageController.getController().getMasterLanguage(repositoryVO.getRepositoryId());
 
            ContentVO parentContent = ContentController.getContentController().getContentVOWithPath(repositoryVO.getId(), restString, true, principal);
            logger.info("parentContent:" + parentContent);
            ContentVO newContentVO = ContentController.getContentController().create(parentContent.getId(), contentTypeDefinitionVO.getContentTypeDefinitionId(), parentContent.getRepositoryId(), missingRemoteContentVO);
            logger.info("Now we want to create the version also on:" + newContentVO.getName());
            ContentVersionVO contentVersionVO = new ContentVersionVO();
            contentVersionVO.setVersionComment("deployment");
            contentVersionVO.setVersionModifier(principal.getName());
            logger.info("missingRemoteContentVO.getVersions():" + missingRemoteContentVO.getVersions());
            if(missingRemoteContentVO.getVersions() != null && missingRemoteContentVO.getVersions().length > 0)
            {
              contentVersionVO.setVersionValue(missingRemoteContentVO.getVersions()[0]);
              logger.info("Creating version on content: " + newContentVO.getId() + " in language: " + languageVO.getId());
View Full Code Here

Examples of org.infoglue.cms.security.InfoGluePrincipal

  }
   
   
    protected void intercept(Map hashMap, String InterceptionPointName) throws ConstraintException, SystemException, Bug, Exception
  {
      InfoGluePrincipal principal = UserControllerProxy.getController().getUser(CmsPropertyHandler.getAdministratorUserName());
    InterceptionPointVO interceptionPointVO = InterceptionPointController.getController().getInterceptionPointVOWithName(InterceptionPointName);
     
    if(interceptionPointVO == null)
      throw new SystemException("The InterceptionPoint " + InterceptionPointName + " was not found. The system will not work unless you restore it.");
View Full Code Here

Examples of org.infoglue.cms.security.InfoGluePrincipal

  {
    boolean hasRole = false;
   
    if(roleName != null)
    {
      InfoGluePrincipal infoGluePrincipal = null;
      if(userName == null && !userName.equals(""))
        infoGluePrincipal = getController().getPrincipal();
      else
        infoGluePrincipal = getController().getPrincipal(userName);
     
View Full Code Here

Examples of org.infoglue.cms.security.InfoGluePrincipal

  {
    boolean hasGroup = false;
   
    if(groupName != null)
    {
      InfoGluePrincipal infoGluePrincipal = null;
      if(userName == null && !userName.equals(""))
        infoGluePrincipal = getController().getPrincipal();
      else
        infoGluePrincipal = getController().getPrincipal(userName);
     
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.