Search in sources :

Example 6 with Smilie

use of net.jforum.entities.Smilie in project jforum2 by rafaelsteil.

the class SmiliesRepository method getSmilies.

public static List getSmilies() {
    List list = (List) cache.get(FQN, ENTRIES);
    if (!contexted) {
        String forumLink = SystemGlobals.getValue(ConfigKeys.FORUM_LINK);
        for (Iterator iter = list.iterator(); iter.hasNext(); ) {
            Smilie s = (Smilie) iter.next();
            s.setUrl(s.getUrl().replaceAll("#CONTEXT#", forumLink).replaceAll("\\\\", ""));
        }
        cache.add(FQN, ENTRIES, list);
        contexted = true;
    }
    return list;
}
Also used : Iterator(java.util.Iterator) List(java.util.List) Smilie(net.jforum.entities.Smilie)

Example 7 with Smilie

use of net.jforum.entities.Smilie in project jforum2 by rafaelsteil.

the class GenericSmilieDAO method getSmilie.

private Smilie getSmilie(ResultSet rs) throws SQLException {
    Smilie s = new Smilie();
    s.setId(rs.getInt("smilie_id"));
    s.setCode(rs.getString("code"));
    s.setUrl(rs.getString("url"));
    s.setDiskName(rs.getString("disk_name"));
    return s;
}
Also used : Smilie(net.jforum.entities.Smilie)

Aggregations

Smilie (net.jforum.entities.Smilie)7 Iterator (java.util.Iterator)2 List (java.util.List)2 File (java.io.File)1 PreparedStatement (java.sql.PreparedStatement)1 ResultSet (java.sql.ResultSet)1 SQLException (java.sql.SQLException)1 ArrayList (java.util.ArrayList)1 SmilieDAO (net.jforum.dao.SmilieDAO)1 DatabaseException (net.jforum.exceptions.DatabaseException)1