rem stringlengths 0 477k | add stringlengths 0 313k | context stringlengths 6 599k |
|---|---|---|
ResultSet rs = p.executeQuery(); while (rs.next()) { PrivateMessage pm = this.getPm(rs, false); User toUser = new User(); toUser.setId(rs.getInt("user_id")); toUser.setUsername(rs.getString("username")); pm.setToUser(toUser); pmList.add(pm); } rs.close(); p.close(); return pmList; } | List pmList = new ArrayList(); rs = p.executeQuery(); while (rs.next()) { PrivateMessage pm = this.getPm(rs, false); User toUser = new User(); toUser.setId(rs.getInt("user_id")); toUser.setUsername(rs.getString("username")); pm.setToUser(toUser); pmList.add(pm); } return pmList; } catch (SQLException e) { String es... | public List selectFromSent(User user) throws Exception { String query = SystemGlobals.getSql("PrivateMessageModel.baseListing"); query = query.replaceAll("#FILTER#", SystemGlobals.getSql("PrivateMessageModel.sent")); PreparedStatement p = JForumExecutionContext.getConnection().prepareStatement(query); p.setInt(1... |
public void send(PrivateMessage pm) throws Exception | public void send(PrivateMessage pm) | public void send(PrivateMessage pm) throws Exception { // We should store 2 copies: one for the sendee's sent box // and another for the target user's inbox. PreparedStatement p = this.getStatementForAutoKeys("PrivateMessageModel.add"); // Sendee's sent box this.addPm(pm, p); this.addPmText(pm); // Target use... |
PreparedStatement p = this.getStatementForAutoKeys("PrivateMessageModel.add"); | PreparedStatement p=null; try { p = this.getStatementForAutoKeys("PrivateMessageModel.add"); | public void send(PrivateMessage pm) throws Exception { // We should store 2 copies: one for the sendee's sent box // and another for the target user's inbox. PreparedStatement p = this.getStatementForAutoKeys("PrivateMessageModel.add"); // Sendee's sent box this.addPm(pm, p); this.addPmText(pm); // Target use... |
this.addPm(pm, p); this.addPmText(pm); p.setInt(1, PrivateMessageType.NEW); pm.setId(this.executeAutoKeysQuery(p)); this.addPmText(pm); p.close(); } | this.addPm(pm, p); this.addPmText(pm); p.setInt(1, PrivateMessageType.NEW); pm.setId(this.executeAutoKeysQuery(p)); this.addPmText(pm); } catch (SQLException e) { String es = "Erorr send()"; log.error(es, e); throw new RuntimeException(es, e); } finally { DbUtils.close(p); } } | public void send(PrivateMessage pm) throws Exception { // We should store 2 copies: one for the sendee's sent box // and another for the target user's inbox. PreparedStatement p = this.getStatementForAutoKeys("PrivateMessageModel.add"); // Sendee's sent box this.addPm(pm, p); this.addPmText(pm); // Target use... |
public void updateType(PrivateMessage pm) throws Exception | public void updateType(PrivateMessage pm) | public void updateType(PrivateMessage pm) throws Exception { PreparedStatement p = JForumExecutionContext.getConnection().prepareStatement(SystemGlobals.getSql("PrivateMessageModel.updateType")); p.setInt(1,pm.getType()); p.setInt(2, pm.getId()); p.executeUpdate(); p.close(); } |
PreparedStatement p = JForumExecutionContext.getConnection().prepareStatement(SystemGlobals.getSql("PrivateMessageModel.updateType")); p.setInt(1,pm.getType()); p.setInt(2, pm.getId()); p.executeUpdate(); p.close(); | PreparedStatement p=null; try { p = JForumExecutionContext.getConnection().prepareStatement(SystemGlobals.getSql("PrivateMessageModel.updateType")); p.setInt(1,pm.getType()); p.setInt(2, pm.getId()); p.executeUpdate(); } catch (SQLException e) { String es = "Erorr updateType()"; log.error(es, e); throw new RuntimeExcep... | public void updateType(PrivateMessage pm) throws Exception { PreparedStatement p = JForumExecutionContext.getConnection().prepareStatement(SystemGlobals.getSql("PrivateMessageModel.updateType")); p.setInt(1,pm.getType()); p.setInt(2, pm.getId()); p.executeUpdate(); p.close(); } |
public void delete(PrivateMessage[] pm) throws Exception; | public void delete(PrivateMessage[] pm) ; | public void delete(PrivateMessage[] pm) throws Exception; |
public PrivateMessage selectById(PrivateMessage pm) throws Exception; | public PrivateMessage selectById(PrivateMessage pm) ; | public PrivateMessage selectById(PrivateMessage pm) throws Exception; |
public List selectFromInbox(User user) throws Exception; | public List selectFromInbox(User user) ; | public List selectFromInbox(User user) throws Exception; |
public List selectFromSent(User user) throws Exception; | public List selectFromSent(User user) ; | public List selectFromSent(User user) throws Exception; |
public void send(PrivateMessage pm) throws Exception; | public void send(PrivateMessage pm) ; | public void send(PrivateMessage pm) throws Exception; |
public void updateType(PrivateMessage pm) throws Exception; | public void updateType(PrivateMessage pm) ; | public void updateType(PrivateMessage pm) throws Exception; |
public SearchAction(ActionServletRequest request, HttpServletResponse response, SimpleHash context) { this.request = request; this.response = response; this.context = context; } | public SearchAction() {} | public SearchAction(ActionServletRequest request, HttpServletResponse response, SimpleHash context) { this.request = request; this.response = response; this.context = context; } |
public void doModeration() throws Exception | public void doModeration() | public void doModeration() throws Exception { new ModerationHelper().doModeration(this.makeRedirect()); if (JForumExecutionContext.getRequest().getParameter("topicMove") != null) { this.setTemplateName(TemplateKeys.MODERATION_MOVE_TOPICS); } } |
public void filters() throws Exception | public void filters() | public void filters() throws Exception { this.setTemplateName(TemplateKeys.SEARCH_FILTERS); this.context.put("categories", ForumRepository.getAllCategories()); this.context.put("pageTitle", I18n.getMessage("ForumBase.search")); } |
public void list() throws Exception | public void list() | public void list() throws Exception { this.filters(); } |
private String makeRedirect() throws Exception | private String makeRedirect() | private String makeRedirect() throws Exception { String persistData = this.request.getParameter("persistData"); if (persistData == null) { this.getSearchFields(); } else { String[] p = persistData.split("&"); for (int i = 0; i < p.length; i++) { String[] v = p[i].split("="); String name = (Strin... |
Field field = this.getClass().getDeclaredField(name); if (field != null && v[1] != null && !v[1].equals("")) { field.set(this, v[1]); } } | Field field; try { field = this.getClass().getDeclaredField(name); if (field != null && v[1] != null && !v[1].equals("")) { field.set(this, v[1]); } } catch (Exception e) { String es = "Erorr add()"; log.error(es, e); throw new RuntimeException(es, e); } } | private String makeRedirect() throws Exception { String persistData = this.request.getParameter("persistData"); if (persistData == null) { this.getSearchFields(); } else { String[] p = persistData.split("&"); for (int i = 0; i < p.length; i++) { String[] v = p[i].split("="); String name = (Strin... |
path.append(this.request.getContextPath()).append("/jforum" + SystemGlobals.getValue(ConfigKeys.SERVLET_EXTENSION) + "?module=search&action=search&clean=1"); | path.append(this.request.getContextPath()).append("/jforum").append( SystemGlobals.getValue(ConfigKeys.SERVLET_EXTENSION)).append( "?module=search&action=search&clean=1"); | private String makeRedirect() throws Exception { String persistData = this.request.getParameter("persistData"); if (persistData == null) { this.getSearchFields(); } else { String[] p = persistData.split("&"); for (int i = 0; i < p.length; i++) { String[] v = p[i].split("="); String name = (Strin... |
public void moderationDone() throws Exception | public void moderationDone() | public void moderationDone() throws Exception { this.setTemplateName(new ModerationHelper().moderationDone(this.makeRedirect())); } |
public void moveTopic() throws Exception | public void moveTopic() | public void moveTopic() throws Exception { new ModerationHelper().moveTopicsSave(this.makeRedirect()); } |
private List onlyAllowedData(List topics) throws Exception | private List onlyAllowedData(List topics) | private List onlyAllowedData(List topics) throws Exception { List l = new ArrayList(); for (Iterator iter = topics.iterator(); iter.hasNext(); ) { Topic t = (Topic)iter.next(); Forum f = ForumRepository.getForum(t.getForumId()); if (f != null && ForumRepository.isCategoryAccessible(f.getCategoryId())) { ... |
public void search() throws Exception | public void search() | public void search() throws Exception { this.getSearchFields(); SearchData sd = new SearchData(); sd.setKeywords(kw); sd.setAuthor(author); sd.setOrderByField(sortBy); sd.setOrderBy(sortDir); if (postTime != null) { sd.setTime(new Date(Long.parseLong(postTime))); } if (searchTerms != null) { s... |
sd.setUseAllWords(searchTerms.equals("any") ? false : true); | sd.setUseAllWords(!searchTerms.equals("any")); | public void search() throws Exception { this.getSearchFields(); SearchData sd = new SearchData(); sd.setKeywords(kw); sd.setAuthor(author); sd.setOrderByField(sortBy); sd.setOrderBy(sortDir); if (postTime != null) { sd.setTime(new Date(Long.parseLong(postTime))); } if (searchTerms != null) { s... |
public void cleanSearch() throws Exception; | public void cleanSearch() ; | public void cleanSearch() throws Exception; |
public List search(SearchData sd) throws Exception; | public List search(SearchData sd) ; | public List search(SearchData sd) throws Exception; |
Method m = clazz.getMethod("valueOf", String.class); | public Object nullSafeGet(ResultSet rs, String[] names, Object owner) throws HibernateException, SQLException { String type = (String)Hibernate.STRING.nullSafeGet(rs, names[0]); if (type == null) return null; String value = (String)Hibernate.STRING.nullSafeGet(rs, names[1]); if (value == null) return null; ... | |
return m.invoke(null, value); | if (clazz.equals(String.class)) { return value; } else { Method m = clazz.getMethod("valueOf", String.class); return m.invoke(null, value); } | public Object nullSafeGet(ResultSet rs, String[] names, Object owner) throws HibernateException, SQLException { String type = (String)Hibernate.STRING.nullSafeGet(rs, names[0]); if (type == null) return null; String value = (String)Hibernate.STRING.nullSafeGet(rs, names[1]); if (value == null) return null; ... |
throw new TooMuchDataException("I can't take any data yet."); | BufferedReader in = new BufferedReader(new InputStreamReader(data)); StringBuilder buffer = new StringBuilder(); String line; while ((line = in.readLine()) != null) { buffer.append(line); buffer.append("\n"); } message = buffer.toString(); if (message.length() > 1024) throw new TooMuchDataException("Message greater th... | public void deliver(String from, String recipient, InputStream data) throws TooMuchDataException, IOException { throw new TooMuchDataException("I can't take any data yet."); } |
orderedContestants = new Vector<ContestantPeer>(battle.getContestants()); Collections.sort(orderedContestants); | public BattleResultsTableModel(Battle battle) { super(); this.battle = battle; orderedContestants = new Vector<ContestantPeer>(battle.getContestants()); Collections.sort(orderedContestants); } | |
return orderedContestants.size(); | return battle.getContestants().size(); | public int getRowCount() { return orderedContestants.size(); } |
ContestantPeer r = (ContestantPeer) orderedContestants.elementAt(row); | Vector<ContestantPeer> orderedContestants = new Vector<ContestantPeer>(battle.getContestants()); Collections.sort(orderedContestants); ContestantPeer r = orderedContestants.elementAt(row); | public Object getValueAt(int row, int col) { ContestantPeer r = (ContestantPeer) orderedContestants.elementAt(row); ContestantStatistics statistics = r.getStatistics(); switch (col) { case 0: { int place = row + 1; while (place < getRowCount() && statistics.getTotalScore() == orderedContestants.elementA... |
return "" + (int) (statistics.getTotalScore()); | return "" + (int) statistics.getTotalScore(); | public Object getValueAt(int row, int col) { ContestantPeer r = (ContestantPeer) orderedContestants.elementAt(row); ContestantStatistics statistics = r.getStatistics(); switch (col) { case 0: { int place = row + 1; while (place < getRowCount() && statistics.getTotalScore() == orderedContestants.elementA... |
return "" + (int) (statistics.getTotalSurvivalScore()); | return "" + (int) statistics.getTotalSurvivalScore(); | public Object getValueAt(int row, int col) { ContestantPeer r = (ContestantPeer) orderedContestants.elementAt(row); ContestantStatistics statistics = r.getStatistics(); switch (col) { case 0: { int place = row + 1; while (place < getRowCount() && statistics.getTotalScore() == orderedContestants.elementA... |
return "" + (int) (statistics.getTotalWinnerScore()); | return "" + (int) statistics.getTotalWinnerScore(); | public Object getValueAt(int row, int col) { ContestantPeer r = (ContestantPeer) orderedContestants.elementAt(row); ContestantStatistics statistics = r.getStatistics(); switch (col) { case 0: { int place = row + 1; while (place < getRowCount() && statistics.getTotalScore() == orderedContestants.elementA... |
return "" + (int) (statistics.getTotalBulletDamageScore()); | return "" + (int) statistics.getTotalBulletDamageScore(); | public Object getValueAt(int row, int col) { ContestantPeer r = (ContestantPeer) orderedContestants.elementAt(row); ContestantStatistics statistics = r.getStatistics(); switch (col) { case 0: { int place = row + 1; while (place < getRowCount() && statistics.getTotalScore() == orderedContestants.elementA... |
return "" + (int) (statistics.getTotalKilledEnemyBulletScore()); | return "" + (int) statistics.getTotalKilledEnemyBulletScore(); | public Object getValueAt(int row, int col) { ContestantPeer r = (ContestantPeer) orderedContestants.elementAt(row); ContestantStatistics statistics = r.getStatistics(); switch (col) { case 0: { int place = row + 1; while (place < getRowCount() && statistics.getTotalScore() == orderedContestants.elementA... |
return "" + (int) (statistics.getTotalRammingDamageScore()); | return "" + (int) statistics.getTotalRammingDamageScore(); | public Object getValueAt(int row, int col) { ContestantPeer r = (ContestantPeer) orderedContestants.elementAt(row); ContestantStatistics statistics = r.getStatistics(); switch (col) { case 0: { int place = row + 1; while (place < getRowCount() && statistics.getTotalScore() == orderedContestants.elementA... |
return "" + (int) (statistics.getTotalKilledEnemyRammingScore()); | return "" + (int) statistics.getTotalKilledEnemyRammingScore(); | public Object getValueAt(int row, int col) { ContestantPeer r = (ContestantPeer) orderedContestants.elementAt(row); ContestantStatistics statistics = r.getStatistics(); switch (col) { case 0: { int place = row + 1; while (place < getRowCount() && statistics.getTotalScore() == orderedContestants.elementA... |
return "" + (int) (statistics.getTotalFirsts()); | return "" + (int) statistics.getTotalFirsts(); | public Object getValueAt(int row, int col) { ContestantPeer r = (ContestantPeer) orderedContestants.elementAt(row); ContestantStatistics statistics = r.getStatistics(); switch (col) { case 0: { int place = row + 1; while (place < getRowCount() && statistics.getTotalScore() == orderedContestants.elementA... |
return "" + (int) (statistics.getTotalSeconds()); | return "" + (int) statistics.getTotalSeconds(); | public Object getValueAt(int row, int col) { ContestantPeer r = (ContestantPeer) orderedContestants.elementAt(row); ContestantStatistics statistics = r.getStatistics(); switch (col) { case 0: { int place = row + 1; while (place < getRowCount() && statistics.getTotalScore() == orderedContestants.elementA... |
return "" + (int) (statistics.getTotalThirds()); | return "" + (int) statistics.getTotalThirds(); | public Object getValueAt(int row, int col) { ContestantPeer r = (ContestantPeer) orderedContestants.elementAt(row); ContestantStatistics statistics = r.getStatistics(); switch (col) { case 0: { int place = row + 1; while (place < getRowCount() && statistics.getTotalScore() == orderedContestants.elementA... |
if ( b == 2 ) | else | static int checkAck( InputStream in, boolean isGet ) throws IOException, ResourceDoesNotExistException, TransferFailedException { int b = in.read(); // b may be 0 for success, // 1 for error, // 2 for fatal error, // -1 if ( b == 0 || b =... |
InputStream in = null; | InputStream in; | public void get( String resourceName, File destination ) throws TransferFailedException, ResourceDoesNotExistException, AuthorizationException { Resource resource = new Resource( resourceName ); fireGetInitiated( resource, destination ); ChannelExec channel = null; //I/O stream... |
String mkdirCmd = "mkdir -p " + basedir + "/" + dir + "\n"; | String umaskCmd = ""; if ( getRepository().getPermissions() != null ) { final String dirPerms = getRepository().getPermissions().getDirectoryMode(); if ( dirPerms != null ) { umaskCmd = "umask " + PermissionModeUtils.getUserMaskFor( dirPerms ) + "\n"; executeCommand( umaskCmd ); } } String mkdirCmd = umaskCmd + "mkdir... | public void put( File source, String resourceName ) throws TransferFailedException, ResourceDoesNotExistException, AuthorizationException { String basedir = getRepository().getBasedir(); resourceName = StringUtils.replace( resourceName, "\\", "/" ); String dir = PathUtils.dirname( res... |
PatternBlitz(FiniteAlphabet alfa, StateMachineToolkit factory) | public PatternBlitz(FiniteAlphabet alfa, StateMachineToolkit factory) | PatternBlitz(FiniteAlphabet alfa, StateMachineToolkit factory) { this.alfa = alfa; alfaIdx = AlphabetManager.getAlphabetIndex(alfa); patternStore = new LinkedList(); instanceStore = new LinkedList(); this.factory = factory; } |
instanceFactory.setListener(listener); | public void addPattern(String pattern) { try { // create DFA for pattern FiniteAutomaton dfa = PatternMaker.compilePattern(pattern, alfa); // convert to state machine StateMachineFactory instanceFactory = factory.getFactory(pattern, dfa); // save in p... | |
public void approveMessages() throws Exception | public void approveMessages() | public void approveMessages() throws Exception { if (SessionFacade.getUserSession().isModerator(this.request.getIntParameter("forum_id"))) { new ModerationAction(this.context, this.request).doSave(); } JForumExecutionContext.setRedirect(this.request.getContextPath() + "/forums/show/" + this.request.getParamet... |
public void list() throws Exception | public void list() | public void list() throws Exception { this.setTemplateName(TemplateKeys.FORUMS_LIST); this.context.put("allCategories", ForumCommon.getAllCategoriesAndForums(true)); this.context.put("topicsPerPage", new Integer(SystemGlobals.getIntValue(ConfigKeys.TOPICS_PER_PAGE))); this.context.put("rssEnabled", SystemGlobal... |
public void moderation() throws Exception | public void moderation() | public void moderation() throws Exception { this.context.put("openModeration", true); this.show(); } |
public void newMessages() throws Exception | public void newMessages() | public void newMessages() throws Exception { this.request.addParameter("post_time", Long.toString(SessionFacade.getUserSession().getLastVisit().getTime())); this.request.addParameter("clean", "true"); this.request.addParameter("sort_by", "t." + SystemGlobals.getValue(ConfigKeys.TOPIC_TIME_FIELD)); this.request.add... |
public void readAll() throws Exception | public void readAll() | public void readAll() throws Exception { SearchData sd = new SearchData(); sd.setTime(SessionFacade.getUserSession().getLastVisit()); String forumId = this.request.getParameter("forum_id"); if (forumId != null) { sd.setForumId(Integer.parseInt(forumId)); } List allTopics = DataAccessDriver.getInstance().ne... |
public void show() throws Exception | public void show() | public void show() throws Exception { int forumId = this.request.getIntParameter("forum_id"); ForumDAO fm = DataAccessDriver.getInstance().newForumDAO(); // The user can access this forum? Forum forum = ForumRepository.getForum(forumId); if (forum == null || !ForumRepository.isCategoryAccessible(forum.getCate... |
public void unwatchForum() throws Exception{ | public void unwatchForum() { | public void unwatchForum() throws Exception{ if (SessionFacade.isLogged()) { int forumId = this.request.getIntParameter("forum_id"); int userId = SessionFacade.getUserSession().getUserId(); DataAccessDriver.getInstance().newForumDAO().removeSubscription(forumId, userId); String returnPath = this.redirectLi... |
public void watchForum() throws Exception { | public void watchForum() { | public void watchForum() throws Exception { int forumId = this.request.getIntParameter("forum_id"); int userId = SessionFacade.getUserSession().getUserId(); this.watchForum(DataAccessDriver.getInstance().newForumDAO(), forumId, userId); JForumExecutionContext.setRedirect(this.redirectLinkToShowAction(forumId)); } |
public ModerationAction(SimpleHash context, ActionServletRequest request) { this.context = context; this.request = request; } | public ModerationAction() {} | public ModerationAction(SimpleHash context, ActionServletRequest request) { this.context = context; this.request = request; } |
public void doSave() throws Exception | public void doSave() | public void doSave() throws Exception { String[] posts = this.request.getParameterValues("post_id"); if (posts != null) { TopicDAO tm = DataAccessDriver.getInstance().newTopicDAO(); for (int i = 0; i < posts.length; i++) { int postId = Integer.parseInt(posts[i]); String status = this.request.getPara... |
public static List topicsByForum(int forumId, int start) throws Exception | public static List topicsByForum(int forumId, int start) | public static List topicsByForum(int forumId, int start) throws Exception { TopicDAO tm = DataAccessDriver.getInstance().newTopicDAO(); int topicsPerPage = SystemGlobals.getIntValue(ConfigKeys.TOPICS_PER_PAGE); List topics = null; // Try to get the first's page of topics from the cache if (start == 0 && SystemG... |
List topics = null; | List topics; | public static List topicsByForum(int forumId, int start) throws Exception { TopicDAO tm = DataAccessDriver.getInstance().newTopicDAO(); int topicsPerPage = SystemGlobals.getIntValue(ConfigKeys.TOPICS_PER_PAGE); List topics = null; // Try to get the first's page of topics from the cache if (start == 0 && SystemG... |
public Map topicsByForum(int forumId) throws Exception; | public Map topicsByForum(int forumId) ; | public Map topicsByForum(int forumId) throws Exception; |
command = (in.readLine()).trim(); | command = (in.readLine()); if (command != null) command = command.trim(); | public SocketHandler(SMTPServerContext serverContext, Socket aSocket) throws IOException { this.serverContext = serverContext; Session session = new Session(serverContext, aSocket); PrintWriter out = new PrintWriter(aSocket.getOutputStream()); BufferedReader in = new BufferedReader(new InputStreamReader(... |
public Session(final SMTPServerContext serverContext, final Socket socket) | public Session(SMTPServerContext serverContext, String remoteHostname) | public Session(final SMTPServerContext serverContext, final Socket socket) { this.serverContext = serverContext; this.socket = socket; remoteHostname = socket.getInetAddress().getCanonicalHostName(); } |
this.socket = socket; remoteHostname = socket.getInetAddress().getCanonicalHostName(); | this.remoteHostname = remoteHostname; | public Session(final SMTPServerContext serverContext, final Socket socket) { this.serverContext = serverContext; this.socket = socket; remoteHostname = socket.getInetAddress().getCanonicalHostName(); } |
LOG.info(strings().getString(HJBStrings.JUST_SCHEDULED_A_COMMAND, aCommand)); | if (LOG.isDebugEnabled()) { LOG.debug(strings().getString(HJBStrings.JUST_SCHEDULED_A_COMMAND, aCommand)); } | public void schedule(JMSCommand aCommand) { if (null == aCommand) { LOG.warn(strings().getString(HJBStrings.HJB_RUNNER_IGNORED_NULL_COMMAND)); return; } if (isTerminated()) { String message = strings().getString(HJBStrings.HJB_RUNNER_REFUSED_COMMAND, ... |
public void configurations() throws Exception | public void configurations() | public void configurations() throws Exception { this.context.put("icon", SystemGlobals.getValue(ConfigKeys.ATTACHMENTS_ICON)); this.context.put("createThumb", SystemGlobals.getBoolValue(ConfigKeys.ATTACHMENTS_IMAGES_CREATE_THUMB)); this.context.put("thumbH", SystemGlobals.getValue(ConfigKeys.ATTACHMENTS_IMAGES_MAX_... |
public void configurationsSave() throws Exception | public void configurationsSave() | public void configurationsSave() throws Exception { ConfigAction ca = new ConfigAction(this.request, this.response, this.context); ca.updateData(ca.getConfig()); this.configurations(); } |
public void extensionGroups() throws Exception | public void extensionGroups() | public void extensionGroups() throws Exception { this.setTemplateName(TemplateKeys.ATTACHMENTS_EXTENSION_GROUPS); this.context.put("groups", DataAccessDriver.getInstance().newAttachmentDAO().selectExtensionGroups()); } |
public void extensionGroupsSave() throws Exception | public void extensionGroupsSave() | public void extensionGroupsSave() throws Exception { AttachmentExtensionGroup g = new AttachmentExtensionGroup(); g.setAllow(this.request.getParameter("allow") != null); g.setDownloadMode(this.request.getIntParameter("download_mode")); g.setName(this.request.getParameter("name")); g.setUploadIcon(this.request.g... |
public void extensionGroupsUpdate() throws Exception | public void extensionGroupsUpdate() | public void extensionGroupsUpdate() throws Exception { AttachmentDAO am = DataAccessDriver.getInstance().newAttachmentDAO(); // Check if there are records to remove String[] delete = this.request.getParameterValues("delete"); List deleteList = new ArrayList(); if (delete != null) { deleteList = Arrays.asList(... |
public void extensions() throws Exception | public void extensions() | public void extensions() throws Exception { AttachmentDAO am = DataAccessDriver.getInstance().newAttachmentDAO(); this.setTemplateName(TemplateKeys.ATTACHMENTS_EXTENSIONS); this.context.put("extensions", am.selectExtensions()); this.context.put("groups", am.selectExtensionGroups()); } |
public void extensionsSave() throws Exception | public void extensionsSave() | public void extensionsSave() throws Exception { AttachmentExtension e = new AttachmentExtension(); e.setAllow(this.request.getParameter("allow") != null); e.setComment(this.request.getParameter("comment")); e.setExtension(this.request.getParameter("extension")); e.setUploadIcon(this.request.getParameter("upload_i... |
public void extensionsUpdate() throws Exception | public void extensionsUpdate() | public void extensionsUpdate() throws Exception { AttachmentDAO am = DataAccessDriver.getInstance().newAttachmentDAO(); // Check for records to delete String[] delete = this.request.getParameterValues("delete"); List deleteList = new ArrayList(); if (delete != null) { deleteList = Arrays.asList(delete); am.... |
public void list() throws Exception | public void list() | public void list() throws Exception { this.configurations(); } |
public void quotaGroupsSave() throws Exception | public void quotaGroupsSave() | public void quotaGroupsSave() throws Exception { int total = this.request.getIntParameter("total_groups"); AttachmentDAO am = DataAccessDriver.getInstance().newAttachmentDAO(); am.cleanGroupQuota(); for (int i = 0; i < total; i++) { String l = this.request.getParameter("limit_" + i); if (l == null || l.eq... |
public void quotaLimit() throws Exception | public void quotaLimit() | public void quotaLimit() throws Exception { AttachmentDAO am = DataAccessDriver.getInstance().newAttachmentDAO(); this.context.put("quotas", am.selectQuotaLimit()); this.setTemplateName(TemplateKeys.ATTACHMENTS_QUOTA_LIMIT); this.context.put("groups", new TreeGroup().getNodes()); this.context.put("selectedList"... |
public void quotaLimitSave() throws Exception | public void quotaLimitSave() | public void quotaLimitSave() throws Exception { QuotaLimit ql = new QuotaLimit(); ql.setDescription(this.request.getParameter("quota_description")); ql.setSize(this.request.getIntParameter("max_filesize")); ql.setType(this.request.getIntParameter("type")); DataAccessDriver.getInstance().newAttachmentDAO().addQu... |
public void quotaLimitUpdate() throws Exception | public void quotaLimitUpdate() | public void quotaLimitUpdate() throws Exception { AttachmentDAO am = DataAccessDriver.getInstance().newAttachmentDAO(); // First check if we should delete some entry String[] delete = this.request.getParameterValues("delete"); List deleteList = new ArrayList(); if (delete != null) { deleteList = Arrays.asList... |
public ConfigAction(ActionServletRequest request, HttpServletResponse response, SimpleHash context) { this.request = request; this.response = response; this.context = context; } | public ConfigAction() {} | public ConfigAction(ActionServletRequest request, HttpServletResponse response, SimpleHash context) { this.request = request; this.response = response; this.context = context; } |
void updateData(Properties p) throws Exception | void updateData(Properties p) | void updateData(Properties p) throws Exception { int oldTopicsPerPage = SystemGlobals.getIntValue(ConfigKeys.TOPICS_PER_PAGE); for (Iterator iter = p.entrySet().iterator(); iter.hasNext(); ) { Map.Entry entry = (Map.Entry)iter.next(); SystemGlobals.setValue((String)entry.getKey(), (String)entry.getValue()); ... |
public List selectExtensionGroups() throws Exception; | public List selectExtensionGroups(); | public List selectExtensionGroups() throws Exception; |
public void addExtensionGroup(AttachmentExtensionGroup g) throws Exception; | public void addExtensionGroup(AttachmentExtensionGroup g); | public void addExtensionGroup(AttachmentExtensionGroup g) throws Exception; |
public void removeExtensionGroups(String[] ids) throws Exception; | public void removeExtensionGroups(String[] ids); | public void removeExtensionGroups(String[] ids) throws Exception; |
public void updateExtensionGroup(AttachmentExtensionGroup g) throws Exception; | public void updateExtensionGroup(AttachmentExtensionGroup g); | public void updateExtensionGroup(AttachmentExtensionGroup g) throws Exception; |
public List selectExtensions() throws Exception; | public List selectExtensions(); | public List selectExtensions() throws Exception; |
public void addExtension(AttachmentExtension e) throws Exception; | public void addExtension(AttachmentExtension e); | public void addExtension(AttachmentExtension e) throws Exception; |
public void removeExtensions(String[] ids) throws Exception; | public void removeExtensions(String[] ids); | public void removeExtensions(String[] ids) throws Exception; |
public void updateExtension(AttachmentExtension e) throws Exception; | public void updateExtension(AttachmentExtension e); | public void updateExtension(AttachmentExtension e) throws Exception; |
public void cleanGroupQuota() throws Exception; | public void cleanGroupQuota(); | public void cleanGroupQuota() throws Exception; |
public void setGroupQuota(int groupId, int quotaId) throws Exception; | public void setGroupQuota(int groupId, int quotaId); | public void setGroupQuota(int groupId, int quotaId) throws Exception; |
public List selectQuotaLimit() throws Exception; | public List selectQuotaLimit(); | public List selectQuotaLimit() throws Exception; |
public Map selectGroupsQuotaLimits() throws Exception; | public Map selectGroupsQuotaLimits(); | public Map selectGroupsQuotaLimits() throws Exception; |
public void addQuotaLimit(QuotaLimit limit) throws Exception; | public void addQuotaLimit(QuotaLimit limit); | public void addQuotaLimit(QuotaLimit limit) throws Exception; |
public void removeQuotaLimit(String[] ids) throws Exception; | public void removeQuotaLimit(int id); | public void removeQuotaLimit(String[] ids) throws Exception; |
public void updateQuotaLimit(QuotaLimit limit) throws Exception; | public void updateQuotaLimit(QuotaLimit limit); | public void updateQuotaLimit(QuotaLimit limit) throws Exception; |
int imgHeight = 48; | private void drawText(Graphics2D g) { // TODO: Should do it more cleanly int imgHeight = 48; RobotPeer c; for (int i = 0; i < battle.getRobots().size(); i++) { c = (RobotPeer) battle.getRobots().elementAt(i); if (c.isDead()) { continue; } int x = (int) c.getX(); int y = battle.getBattleField().getHeig... | |
centerString(g, energyString, x, y - imgHeight / 2 - smallFontMetrics.getHeight() / 2, smallFont, | centerString(g, energyString, x, y - ROBOT_TEXT_Y_OFFSET - smallFontMetrics.getHeight() / 2, smallFont, | private void drawText(Graphics2D g) { // TODO: Should do it more cleanly int imgHeight = 48; RobotPeer c; for (int i = 0; i < battle.getRobots().size(); i++) { c = (RobotPeer) battle.getRobots().elementAt(i); if (c.isDead()) { continue; } int x = (int) c.getX(); int y = battle.getBattleField().getHeig... |
centerString(g, c.getVeryShortName(), x, y + imgHeight / 2 + smallFontMetrics.getHeight() / 2, smallFont, smallFontMetrics); | centerString(g, c.getVeryShortName(), x, y + ROBOT_TEXT_Y_OFFSET + smallFontMetrics.getHeight() / 2, smallFont, smallFontMetrics); | private void drawText(Graphics2D g) { // TODO: Should do it more cleanly int imgHeight = 48; RobotPeer c; for (int i = 0; i < battle.getRobots().size(); i++) { c = (RobotPeer) battle.getRobots().elementAt(i); if (c.isDead()) { continue; } int x = (int) c.getX(); int y = battle.getBattleField().getHeig... |
final String recipientAddress = extractEmailAddress(args, 3); | String recipientAddress = extractEmailAddress(args, 3); | public void execute(String commandString, ConnectionContext context) throws IOException { Session session = context.getSession(); if (session.getSender() == null) { context.sendResponse("503 Need MAIL before RCPT."); } String args = getArgPredicate(commandString); if (!args.toUpperCase().startsWith("TO:")) { ... |
setTitle(Constants.APP_NAME+" - License Agreement"); | setTitle("Web Photo Publisher License Agreement"); | private void initComponents() {//GEN-BEGIN:initComponents java.awt.GridBagConstraints gridBagConstraints; pnlDialog = new javax.swing.JPanel(); pnlButtons = new javax.swing.JPanel(); btnNoAgree = new javax.swing.JButton(); btnAgree = new javax.swing.JButton(); pnlInstructio... |
btnNoAgree.setMnemonic(resM.getString("DontAgree").charAt(0)); btnNoAgree.setText(res.getString("DONT_AGREE")); | btnNoAgree.setMnemonic('n'); btnNoAgree.setText(java.util.ResourceBundle.getBundle("com/javaimagealbum/resources/Resource").getString("DONT_AGREE")); | private void initComponents() {//GEN-BEGIN:initComponents java.awt.GridBagConstraints gridBagConstraints; pnlDialog = new javax.swing.JPanel(); pnlButtons = new javax.swing.JPanel(); btnNoAgree = new javax.swing.JButton(); btnAgree = new javax.swing.JButton(); pnlInstructio... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.