Package com.dotcms.repackage.org.directwebremoting

Examples of com.dotcms.repackage.org.directwebremoting.WebContext


    hostAPI.archive(host, user, respectFrontendRoles);
  }

  public void unarchiveHost(String id) throws DotDataException, DotSecurityException, PortalException, SystemException {

    WebContext ctx = WebContextFactory.get();
    HttpServletRequest req = ctx.getHttpServletRequest();
    User user = userWebAPI.getLoggedInUser(req);
    boolean respectFrontendRoles = !userWebAPI.isLoggedToBackend(req);
    Host host = hostAPI.find(id, user, respectFrontendRoles);
    hostAPI.unarchive(host, user, respectFrontendRoles);
  }
View Full Code Here


    hostAPI.unarchive(host, user, respectFrontendRoles);
  }

  public void deleteHost(String id) throws DotDataException, DotSecurityException, PortalException, SystemException {

    WebContext ctx = WebContextFactory.get();
    HttpServletRequest req = ctx.getHttpServletRequest();
    User user = userWebAPI.getLoggedInUser(req);
    boolean respectFrontendRoles = !userWebAPI.isLoggedToBackend(req);
    Host host = hostAPI.find(id, user, respectFrontendRoles);
    if(host.isDefault())
      throw new DotStateException("the default host can't be deleted");
View Full Code Here

  }


  public void makeDefault(String id) throws DotDataException, DotSecurityException, PortalException, SystemException {

    WebContext ctx = WebContextFactory.get();
    HttpServletRequest req = ctx.getHttpServletRequest();
    User user = userWebAPI.getLoggedInUser(req);
    boolean respectFrontendRoles = !userWebAPI.isLoggedToBackend(req);
    Host host = hostAPI.find(id, user, respectFrontendRoles);
    HibernateUtil.startTransaction();
    try{
View Full Code Here

public class FieldVariableAjax {
 
  public List<Map<String, Object>> getFieldVariablesForField(String fieldId) throws Exception {
   
    WebContext ctx = WebContextFactory.get();
    HttpServletRequest req = ctx.getHttpServletRequest();
    UserWebAPI userWebAPI = WebAPILocator.getUserWebAPI();
    User user = userWebAPI.getLoggedInUser(req);
    boolean respectFrontendRoles = userWebAPI.isLoggedToFrontend(req);
    FieldAPI fieldAPI = APILocator.getFieldAPI();
   
View Full Code Here

  }
 
  public String saveFieldVariable(String id, String fieldId, String name, String key, String value) throws DotRuntimeException, PortalException,
  SystemException, DotDataException, DotSecurityException {

    WebContext ctx = WebContextFactory.get();
    HttpServletRequest req = ctx.getHttpServletRequest();
    UserWebAPI userWebAPI = WebAPILocator.getUserWebAPI();
    User user = userWebAPI.getLoggedInUser(req);
    boolean respectFrontendRoles = userWebAPI.isLoggedToFrontend(req);

    key = key.trim();
View Full Code Here

    return null;
  }
 
  public String deleteFieldVariable(String fieldVarId) throws DotDataException, DotSecurityException, DotRuntimeException, PortalException, SystemException {

    WebContext ctx = WebContextFactory.get();
    HttpServletRequest req = ctx.getHttpServletRequest();
    UserWebAPI userWebAPI = WebAPILocator.getUserWebAPI();
    User user = userWebAPI.getLoggedInUser(req);
    boolean respectFrontendRoles = userWebAPI.isLoggedToFrontend(req);

    FieldAPI fieldAPI = APILocator.getFieldAPI();
View Full Code Here

    return result;
  }

  public List<Map> getStructureCategories (String structureInode) throws DotDataException, DotSecurityException, PortalException, SystemException {

    WebContext ctx = WebContextFactory.get();
    HttpServletRequest request = ctx.getHttpServletRequest();

    //Retrieving the current user
    User user = PortalUtil.getUser(request);
    boolean respectFrontendRoles = false;
    if(user == null) {
View Full Code Here

   * Returns all the categories and sub-categories of the given structure
   */
  public List<Map<String, Object>> getCategoriesTree (String structureName, String filter)
    throws DotDataException, PortalException, SystemException {

    WebContext ctx = WebContextFactory.get();
    HttpServletRequest request = ctx.getHttpServletRequest();
    PermissionAPI perAPI = APILocator.getPermissionAPI();

    //Retrieving the current user
    User user = PortalUtil.getUser(request);
    boolean respectFrontendRoles = false;
View Full Code Here

  private int maxLevel = 10;
  private List<Map<String, Object>> getChildrenCategories(Category category, int level, String filter)
  throws DotDataException, DotSecurityException, PortalException, SystemException
  {

    WebContext ctx = WebContextFactory.get();
    HttpServletRequest request = ctx.getHttpServletRequest();

    //Retrieving the current user
    User user = PortalUtil.getUser(request);
    boolean respectFrontendRoles = false;
    if(user == null) {
View Full Code Here

    return null;
  }

  public Map<Object,Object> checkDependencies(String structureInode) throws DotDataException{

    WebContext ctx = WebContextFactory.get();
    HttpServletRequest request = ctx.getHttpServletRequest();
   
    Map<Object,Object> result = new HashMap<Object, Object>();
    List<Map<String,String>> containersList = new ArrayList<Map<String,String>>();
   
    // checking if there are containers using this structure
View Full Code Here

TOP

Related Classes of com.dotcms.repackage.org.directwebremoting.WebContext

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.