This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import org.apache.log4j.Logger; | |
import org.apache.log4j.Level; | |
import org.apache.log4j.BasicConfigurator; | |
public class LoggingTest { | |
static Logger logger = Logger.getLogger(LoggingTest.class); | |
public static void main(String[] args) { | |
BasicConfigurator.configure(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Um appender representa um dispositivo de saída de log. Para que um arquivo | |
* seja criado com as mensagens de log da sua aplicação, é necessário registrar | |
* um FileAppender para sua instância de Logger. Isto é feito através do método addAppender(). | |
*/ | |
import java.io.IOException; | |
import org.apache.log4j.Logger; | |
import org.apache.log4j.Level; | |
import org.apache.log4j.Appender; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.io.ByteArrayOutputStream; | |
import java.net.URL; | |
import org.apache.commons.io.IOUtils; | |
import org.apache.commons.lang3.StringUtils; | |
import org.apache.log4j.Logger; | |
import org.json.JSONArray; | |
import org.json.JSONException; | |
/** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.HashMap; | |
import java.util.Map; | |
import br.com.sebrae.model.LayoutEmail; | |
import br.com.sebrae.model.LayoutEmailTag; | |
/** | |
* Substituidor de tags de {@link LayoutEmail}. | |
* @author thania.clair | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.List; | |
import org.apache.commons.lang3.StringUtils; | |
/** | |
* Cria várias cláusulas IN do SQL, de modo que não ocorram problemas de filtros em consultas, | |
* visto que quando um IN é inicializado com mais de mil valores, alguns SGBDs apresentam problemas | |
* para executar a consulta (exemplo: Oracle). | |
* @author thania.clair | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.io.File; | |
import java.util.Arrays; | |
import java.util.Calendar; | |
import java.util.HashMap; | |
import java.util.List; | |
import java.util.Map; | |
import java.util.Properties; | |
import javax.activation.DataHandler; | |
import javax.activation.DataSource; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import javax.activation.MimetypesFileTypeMap; | |
/** | |
* Armazena mime types e gera seus content types de acordo com o arquivo carregado. | |
* @author thania.clair | |
*/ | |
public class MimeTypeGenerator { | |
private String filename; | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.regex.Matcher; | |
import java.util.regex.Pattern; | |
import org.apache.commons.lang3.StringUtils; | |
/** | |
* Validador de e-mail. | |
* @author thania | |
*/ | |
public class EmailValidator { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.ArrayList; | |
import java.util.Collections; | |
import java.util.List; | |
/** | |
* Controlador da paginação das listas de conteúdo. | |
* @author thania.clair | |
*/ | |
public class Paginator { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import javax.servlet.http.HttpServletRequest; | |
import org.apache.commons.lang3.StringUtils; | |
/** | |
* Recupera a ação de um {@link HttpServletRequest}. | |
* @author thania | |
*/ | |
public class ActionRetriever { |
OlderNewer