com.jalios.jcms

Class Channel

  • Converting relative path to File

    Use the following methods to easely convert relative path into Files and vice-versa. Useful for configuration files, uploaded files, file manipulations, etc.
        File confFile = new File(channel.getDataPath("conf.xml"));
        ...
      
  • Communicating by email

    Use those method to retrieve the correct sender to use when sending an email from your java code.
        String sender = channel.getSenderFullEmail();
        Strint recipient = newMbr.getFullEmail();
        String subject = "[" + channel.getName() + "] " + "Welcome!"; // TO DO: I18N
        String content = "Welcome " + newMbr.getFriendlyName() + "\nEnjoy our new site!"; // TO DO: I18N
        MailUtil.sendMail(sender, recipient, subject, content);
      
  • Store Manipulation

    WARNING: Modifying the Store can be very dangerous!!! Only use the following methods if you fully understand their behaviour and their consequences.

  • Others methods of the Channel should be used wisely even though they are public.
    Version:
    $Revision: 54028 $
    Parameters:
    request - the current request
    Returns:
    true if the request comes from the reverse proxy and that attributes were added to the request
    Since:
    jcms-5.5.0

    Copyright © 2001-2010 Jalios SA. All Rights Reserved.