You can subscribe to this list here.
| 2002 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(6) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2003 |
Jan
(10) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(10) |
Aug
(208) |
Sep
(133) |
Oct
(94) |
Nov
(88) |
Dec
(58) |
| 2004 |
Jan
(83) |
Feb
(86) |
Mar
(163) |
Apr
(9) |
May
(90) |
Jun
(75) |
Jul
(170) |
Aug
(226) |
Sep
(61) |
Oct
(86) |
Nov
(54) |
Dec
(3) |
| 2005 |
Jan
|
Feb
(1) |
Mar
(3) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: Enrique R. <las...@us...> - 2005-03-16 15:15:02
|
Update of /cvsroot/canyamo/oreo/src/org/oreodata/predicates In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8743 Modified Files: SimplePredicate.java Log Message: si se busca por un campo que no esta en el persistence.xml no da error. Index: SimplePredicate.java =================================================================== RCS file: /cvsroot/canyamo/oreo/src/org/oreodata/predicates/SimplePredicate.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** SimplePredicate.java 16 Mar 2005 12:30:05 -0000 1.4 --- SimplePredicate.java 16 Mar 2005 15:14:51 -0000 1.5 *************** *** 27,31 **** IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ! */ package org.oreodata.predicates; --- 27,31 ---- IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ! */ package org.oreodata.predicates; *************** *** 44,405 **** public class SimplePredicate extends Predicate { ! ! /** Description of the Field */ ! public final static int IS_NULL = 1; ! /** Description of the Field */ ! public final static int EQUALS = 2; ! /** Description of the Field */ ! public final static int GREATER_THAN = 3; ! /** Description of the Field */ ! public final static int LESS_THAN = 4; ! /** Description of the Field */ ! public final static int LIKE = 5; ! /** Description of the Field */ ! public final static int IN = 6; ! /** Description of the Field */ ! public final static int NOT_NULL = -1; ! /** Description of the Field */ ! public final static int NOT_EQUALS = -2; ! /** Description of the Field */ ! public final static int LESS_THAN_EQUALS = -3; ! /** Description of the Field */ ! public final static int GREATER_THAN_EQUALS = -4; ! /** Description of the Field */ ! public final static int NOT_LIKE = -5; ! /** Description of the Field */ ! public final static int NOT_IN = - 6; ! ! /** Description of the Field */ ! final String recType, fieldName; ! /** Description of the Field */ ! final Object comparisonValue; ! /** Description of the Field */ ! final Comparator comparator; ! /** Description of the Field */ ! final int comparisonType; ! /** Description of the Field */ ! boolean caseInsensitive; ! ! /** Description of the Field */ ! private String sqlQuery; ! ! ! /** ! * Constructor for the SimplePredicate object ! * ! *@param comparisonType Description of Parameter ! *@param recType Description of Parameter ! *@param fieldName Description of Parameter ! *@param comparisonValue Description of Parameter ! *@param comparator Description of Parameter ! *@param caseInsensitive Description of Parameter ! */ ! protected SimplePredicate(int comparisonType, ! String recType, ! String fieldName, ! Object comparisonValue, ! Comparator comparator, ! boolean caseInsensitive) { ! if (comparisonType == EQUALS && comparisonValue == null) { ! comparisonType = IS_NULL; ! } ! if (comparisonType == NOT_EQUALS && comparisonValue == null) { ! comparisonType = NOT_NULL; ! } ! this.comparisonType = comparisonType; ! if (comparisonValue instanceof String){ ! this.comparisonValue = caseInsensitive ? ((String) comparisonValue).toLowerCase() : comparisonValue; ! } else { ! this.comparisonValue = comparisonValue; ! } ! this.fieldName = fieldName; ! this.comparator = comparator; ! this.recType = recType; ! try{ ! RecordDescriptor metadata = DataRegistryImpl.getDefaultRegistry().getMetadata(recType); ! if (metadata.getField(fieldName).getJavaType().equals(String.class)){ ! this.caseInsensitive = caseInsensitive; } else { this.caseInsensitive = false; } ! }catch(IOException ioe){ ! System.out.println("Cannot get record metadata to know if the field could be caseinsensitive"); ! this.caseInsensitive = false; } ! } ! ! ! /** ! * Constructor for the SimplePredicate object ! * ! *@param comparisonType Description of Parameter ! *@param recType Description of Parameter ! *@param fieldName Description of Parameter ! *@param comparisonValue Description of Parameter ! *@param comparator Description of Parameter ! */ ! protected SimplePredicate(int comparisonType, ! String recType, ! String fieldName, ! Object comparisonValue, ! Comparator comparator) { ! this(comparisonType, recType, fieldName, comparisonValue, comparator, false); ! } ! ! ! /** ! * Gets the complement attribute of the SimplePredicate object ! * ! *@return The complement value ! */ ! public Predicate getComplement() { ! if (complement == null) { ! complement = new SimplePredicate(-1 * comparisonType, ! recType, ! fieldName, ! comparisonValue, ! comparator); ! complement.complement = this; } ! return complement; ! } ! ! ! /** ! * Description of the Method ! * ! *@return Description of the Returned Value ! */ ! public String sqlEquivalent() { ! deduceSQLQuery(null); ! return sqlQuery; ! } ! ! ! /** ! * Description of the Method ! * ! *@param table Description of Parameter ! *@return Description of the Returned Value ! */ ! public String sqlEquivalent(String table) { ! deduceSQLQuery(table); ! return sqlQuery; ! } ! ! /** ! * Description of the Method ! * ! *@param table Description of Parameter ! *@return Description of the Returned Value ! */ ! public String sqlEquivalent(String table, boolean selectPKOnly) { ! deduceSQLQuery(table, selectPKOnly); ! return sqlQuery; ! } ! ! /** ! * Description of the Method ! * ! *@param rec Description of Parameter ! *@return Description of the Returned Value ! */ ! public boolean accept(Record rec) { ! if (recType != null && !rec.getType().equals(recType)) { ! return false; } ! Object val = rec.get(fieldName); ! FieldDescriptor fd = null; ! if (caseInsensitive && val != null && !(val instanceof String)) { ! // convert val to a string first ! fd = rec.getMetadata().getField(fieldName); ! try { ! val = fd.valueToString(val).toLowerCase(); ! } catch (DataException e) { ! return false; ! } } ! switch (comparisonType) { ! case IS_NULL: ! return val == null; ! case NOT_NULL: ! return val != null; ! case EQUALS: ! return comparisonValue.equals(val); ! case NOT_EQUALS: ! return !comparisonValue.equals(val); ! case LESS_THAN: ! return compare(val, comparisonValue) < 0; ! case GREATER_THAN: ! return compare(val, comparisonValue) > 0; ! case LESS_THAN_EQUALS: ! return compare(val, comparisonValue) <= 0; ! case GREATER_THAN_EQUALS: ! return compare(val, comparisonValue) >= 0; ! case LIKE: ! { ! if (val != null) { ! if (!(val instanceof String) && fd == null) { ! // convert val to a string first ! fd = rec.getMetadata().getField(fieldName); ! try { ! val = fd.valueToString(val).toLowerCase(); ! } catch (DataException e) { ! return false; ! } ! } ! return ! SQLQueryUtil.matchLikeString( ! (String) val, (String) comparisonValue); ! } else { return false; - } } ! case NOT_LIKE: ! { ! if (val != null) { ! if (!(val instanceof String) && fd == null) { ! // convert val to a string first ! fd = rec.getMetadata().getField(fieldName); ! try { val = fd.valueToString(val).toLowerCase(); ! } catch (DataException e) { return false; - } } - return - !SQLQueryUtil.matchLikeString( - (String) val, (String) comparisonValue); - } else { - return false; - } } ! case NOT_IN://the same for NOT_IN or IN ! case IN:{ ! if (val != null) { ! if (!(val instanceof String) && fd == null) { ! // convert val to a string first ! fd = rec.getMetadata().getField(fieldName); ! try { ! val = fd.valueToString(val).toLowerCase(); ! } catch (DataException e) { ! return false; ! } } - if (comparisonValue instanceof java.util.Collection) - return true; - } else { - return false; - } } } ! throw new UnsupportedOperationException(); ! } ! ! ! /** ! * Description of the Method ! * ! *@return Description of the Returned Value ! */ ! public String recType() { ! return recType; ! } ! ! /** ! * Description of the Method ! * ! *@param tableName Description of Parameter ! */ ! private void deduceSQLQuery(String tableName) ! { ! deduceSQLQuery(tableName, false); ! } ! /** ! * Description of the Method ! * ! *@param tableName Description of Parameter ! */ ! private void deduceSQLQuery(String tableName, boolean selectPKOnly) { ! String literal = SQLQueryUtil.escapeString(comparisonValue); ! String condition = null; ! RecordDescriptor metadata = null; ! if (recType != null) { ! try { ! metadata = DataRegistryImpl.getDefaultRegistry().getMetadata(recType); ! if (tableName == null) { ! tableName = metadata.getTableName(); } ! if (selectPKOnly) ! sqlQuery = "SELECT " + metadata.getPrimaryKeyField().getName() + " "; ! else sqlQuery = "SELECT * "; ! } catch (Exception e) { ! Assert.rethrow(e); ! } } ! switch (comparisonType) { ! case IS_NULL: ! condition = " IS "; ! break; ! case NOT_NULL: ! condition = " IS NOT "; ! break; ! case EQUALS: ! condition = " = "; ! break; ! case NOT_EQUALS: ! condition = " != "; ! break; ! case GREATER_THAN: ! condition = " > "; ! break; ! case GREATER_THAN_EQUALS: ! condition = " >= "; ! break; ! case LESS_THAN: ! condition = " < "; ! break; ! case LESS_THAN_EQUALS: ! condition = " <= "; ! break; ! case LIKE: ! condition = " LIKE "; ! break; ! case NOT_LIKE: ! condition = " NOT LIKE "; ! break; ! case NOT_IN: ! condition = " NOT IN "; ! literal = SQLQueryUtil.fixInQuery(literal); ! break; ! case IN: ! condition = " IN "; ! literal = SQLQueryUtil.fixInQuery(literal); ! break; ! } ! String f = caseInsensitive ? " LOWER(" + fieldName + ")" : fieldName; ! sqlQuery += "FROM " + tableName + " WHERE " + f + condition + literal; ! } ! ! ! /** ! * Description of the Method ! * ! *@param o1 Description of Parameter ! *@param o2 Description of Parameter ! *@return Description of the Returned Value ! */ ! private int compare(Object o1, Object o2) { ! if (comparator != null) { ! return comparator.compare(o1, o2); } - return ((Comparable) o1).compareTo(o2); - } - - public String toString() - { - return sqlEquivalent(); - } } --- 44,412 ---- public class SimplePredicate extends Predicate { ! ! /** Description of the Field */ ! public final static int IS_NULL = 1; ! /** Description of the Field */ ! public final static int EQUALS = 2; ! /** Description of the Field */ ! public final static int GREATER_THAN = 3; ! /** Description of the Field */ ! public final static int LESS_THAN = 4; ! /** Description of the Field */ ! public final static int LIKE = 5; ! /** Description of the Field */ ! public final static int IN = 6; ! /** Description of the Field */ ! public final static int NOT_NULL = -1; ! /** Description of the Field */ ! public final static int NOT_EQUALS = -2; ! /** Description of the Field */ ! public final static int LESS_THAN_EQUALS = -3; ! /** Description of the Field */ ! public final static int GREATER_THAN_EQUALS = -4; ! /** Description of the Field */ ! public final static int NOT_LIKE = -5; ! /** Description of the Field */ ! public final static int NOT_IN = - 6; ! ! /** Description of the Field */ ! final String recType, fieldName; ! /** Description of the Field */ ! final Object comparisonValue; ! /** Description of the Field */ ! final Comparator comparator; ! /** Description of the Field */ ! final int comparisonType; ! /** Description of the Field */ ! boolean caseInsensitive; ! ! /** Description of the Field */ ! private String sqlQuery; ! ! ! /** ! * Constructor for the SimplePredicate object ! * ! *@param comparisonType Description of Parameter ! *@param recType Description of Parameter ! *@param fieldName Description of Parameter ! *@param comparisonValue Description of Parameter ! *@param comparator Description of Parameter ! *@param caseInsensitive Description of Parameter ! */ ! protected SimplePredicate(int comparisonType, ! String recType, ! String fieldName, ! Object comparisonValue, ! Comparator comparator, ! boolean caseInsensitive) { ! if (comparisonType == EQUALS && comparisonValue == null) { ! comparisonType = IS_NULL; ! } ! if (comparisonType == NOT_EQUALS && comparisonValue == null) { ! comparisonType = NOT_NULL; ! } ! this.comparisonType = comparisonType; ! if (comparisonValue instanceof String){ ! this.comparisonValue = caseInsensitive ? ((String) comparisonValue).toLowerCase() : comparisonValue; } else { + this.comparisonValue = comparisonValue; + } + this.fieldName = fieldName; + this.comparator = comparator; + this.recType = recType; + try{ + RecordDescriptor metadata = DataRegistryImpl.getDefaultRegistry().getMetadata(recType); + if (metadata==null){ + System.out.println("Cannot get record metadata to know if the field could be caseinsensitive"); + this.caseInsensitive = false; + }else{ + if (metadata.getField(fieldName)!=null && + metadata.getField(fieldName).getJavaType()!=null && + metadata.getField(fieldName).getJavaType().equals(String.class)){ + this.caseInsensitive = caseInsensitive; + } else { + System.out.println("Cannot get field to know if could be caseinsensitive field: "+ fieldName); + + this.caseInsensitive = false; + } + } + }catch(IOException ioe){ + System.out.println("IOException getting record metadata to know if the field could be caseinsensitive"); this.caseInsensitive = false; } ! } ! ! /** ! * Constructor for the SimplePredicate object ! * ! *@param comparisonType Description of Parameter ! *@param recType Description of Parameter ! *@param fieldName Description of Parameter ! *@param comparisonValue Description of Parameter ! *@param comparator Description of Parameter ! */ ! protected SimplePredicate(int comparisonType, ! String recType, ! String fieldName, ! Object comparisonValue, ! Comparator comparator) { ! this(comparisonType, recType, fieldName, comparisonValue, comparator, false); } ! ! ! /** ! * Gets the complement attribute of the SimplePredicate object ! * ! *@return The complement value ! */ ! public Predicate getComplement() { ! if (complement == null) { ! complement = new SimplePredicate(-1 * comparisonType, ! recType, ! fieldName, ! comparisonValue, ! comparator); ! complement.complement = this; ! } ! return complement; } ! ! ! /** ! * Description of the Method ! * ! *@return Description of the Returned Value ! */ ! public String sqlEquivalent() { ! deduceSQLQuery(null); ! return sqlQuery; } ! ! ! /** ! * Description of the Method ! * ! *@param table Description of Parameter ! *@return Description of the Returned Value ! */ ! public String sqlEquivalent(String table) { ! deduceSQLQuery(table); ! return sqlQuery; ! } ! ! /** ! * Description of the Method ! * ! *@param table Description of Parameter ! *@return Description of the Returned Value ! */ ! public String sqlEquivalent(String table, boolean selectPKOnly) { ! deduceSQLQuery(table, selectPKOnly); ! return sqlQuery; ! } ! ! /** ! * Description of the Method ! * ! *@param rec Description of Parameter ! *@return Description of the Returned Value ! */ ! public boolean accept(Record rec) { ! if (recType != null && !rec.getType().equals(recType)) { return false; } ! Object val = rec.get(fieldName); ! FieldDescriptor fd = null; ! if (caseInsensitive && val != null && !(val instanceof String)) { ! // convert val to a string first ! fd = rec.getMetadata().getField(fieldName); ! try { val = fd.valueToString(val).toLowerCase(); ! } catch (DataException e) { return false; } } ! switch (comparisonType) { ! case IS_NULL: ! return val == null; ! case NOT_NULL: ! return val != null; ! case EQUALS: ! return comparisonValue.equals(val); ! case NOT_EQUALS: ! return !comparisonValue.equals(val); ! case LESS_THAN: ! return compare(val, comparisonValue) < 0; ! case GREATER_THAN: ! return compare(val, comparisonValue) > 0; ! case LESS_THAN_EQUALS: ! return compare(val, comparisonValue) <= 0; ! case GREATER_THAN_EQUALS: ! return compare(val, comparisonValue) >= 0; ! case LIKE: ! { ! if (val != null) { ! if (!(val instanceof String) && fd == null) { ! // convert val to a string first ! fd = rec.getMetadata().getField(fieldName); ! try { ! val = fd.valueToString(val).toLowerCase(); ! } catch (DataException e) { ! return false; ! } ! } ! return ! SQLQueryUtil.matchLikeString( ! (String) val, (String) comparisonValue); ! } else { ! return false; ! } ! } ! case NOT_LIKE: ! { ! if (val != null) { ! if (!(val instanceof String) && fd == null) { ! // convert val to a string first ! fd = rec.getMetadata().getField(fieldName); ! try { ! val = fd.valueToString(val).toLowerCase(); ! } catch (DataException e) { ! return false; ! } ! } ! return ! !SQLQueryUtil.matchLikeString( ! (String) val, (String) comparisonValue); ! } else { ! return false; ! } ! } ! case NOT_IN://the same for NOT_IN or IN ! case IN:{ ! if (val != null) { ! if (!(val instanceof String) && fd == null) { ! // convert val to a string first ! fd = rec.getMetadata().getField(fieldName); ! try { ! val = fd.valueToString(val).toLowerCase(); ! } catch (DataException e) { ! return false; ! } ! } ! if (comparisonValue instanceof java.util.Collection) ! return true; ! } else { ! return false; ! } } } + throw new UnsupportedOperationException(); } ! ! ! /** ! * Description of the Method ! * ! *@return Description of the Returned Value ! */ ! public String recType() { ! return recType; ! } ! ! /** ! * Description of the Method ! * ! *@param tableName Description of Parameter ! */ ! private void deduceSQLQuery(String tableName) { ! deduceSQLQuery(tableName, false); ! } ! /** ! * Description of the Method ! * ! *@param tableName Description of Parameter ! */ ! private void deduceSQLQuery(String tableName, boolean selectPKOnly) { ! String literal = SQLQueryUtil.escapeString(comparisonValue); ! String condition = null; ! RecordDescriptor metadata = null; ! if (recType != null) { ! try { ! metadata = DataRegistryImpl.getDefaultRegistry().getMetadata(recType); ! if (tableName == null) { ! tableName = metadata.getTableName(); ! } ! if (selectPKOnly) ! sqlQuery = "SELECT " + metadata.getPrimaryKeyField().getName() + " "; ! else sqlQuery = "SELECT * "; ! } catch (Exception e) { ! Assert.rethrow(e); ! } } ! switch (comparisonType) { ! case IS_NULL: ! condition = " IS "; ! break; ! case NOT_NULL: ! condition = " IS NOT "; ! break; ! case EQUALS: ! condition = " = "; ! break; ! case NOT_EQUALS: ! condition = " != "; ! break; ! case GREATER_THAN: ! condition = " > "; ! break; ! case GREATER_THAN_EQUALS: ! condition = " >= "; ! break; ! case LESS_THAN: ! condition = " < "; ! break; ! case LESS_THAN_EQUALS: ! condition = " <= "; ! break; ! case LIKE: ! condition = " LIKE "; ! break; ! case NOT_LIKE: ! condition = " NOT LIKE "; ! break; ! case NOT_IN: ! condition = " NOT IN "; ! literal = SQLQueryUtil.fixInQuery(literal); ! break; ! case IN: ! condition = " IN "; ! literal = SQLQueryUtil.fixInQuery(literal); ! break; ! } ! String f = caseInsensitive ? " LOWER(" + fieldName + ")" : fieldName; ! sqlQuery += "FROM " + tableName + " WHERE " + f + condition + literal; } ! ! ! /** ! * Description of the Method ! * ! *@param o1 Description of Parameter ! *@param o2 Description of Parameter ! *@return Description of the Returned Value ! */ ! private int compare(Object o1, Object o2) { ! if (comparator != null) { ! return comparator.compare(o1, o2); ! } ! return ((Comparable) o1).compareTo(o2); ! } ! ! public String toString() { ! return sqlEquivalent(); } } |
|
From: Enrique R. <las...@us...> - 2005-03-16 12:30:29
|
Update of /cvsroot/canyamo/oreo/src/org/oreodata/predicates In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31904 Modified Files: SimplePredicate.java Log Message: case insensitive no se aplica ahora a campos q no sean string Index: SimplePredicate.java =================================================================== RCS file: /cvsroot/canyamo/oreo/src/org/oreodata/predicates/SimplePredicate.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** SimplePredicate.java 10 Mar 2005 16:55:38 -0000 1.3 --- SimplePredicate.java 16 Mar 2005 12:30:05 -0000 1.4 *************** *** 30,33 **** --- 30,34 ---- package org.oreodata.predicates; + import java.io.IOException; import org.oreodata.*; import org.oreodata.util.Assert; *************** *** 114,119 **** this.fieldName = fieldName; this.comparator = comparator; ! this.recType = recType; ! this.caseInsensitive = caseInsensitive; } --- 115,131 ---- this.fieldName = fieldName; this.comparator = comparator; ! this.recType = recType; ! try{ ! RecordDescriptor metadata = DataRegistryImpl.getDefaultRegistry().getMetadata(recType); ! if (metadata.getField(fieldName).getJavaType().equals(String.class)){ ! this.caseInsensitive = caseInsensitive; ! } else { ! this.caseInsensitive = false; ! } ! }catch(IOException ioe){ ! System.out.println("Cannot get record metadata to know if the field could be caseinsensitive"); ! this.caseInsensitive = false; ! } ! } *************** *** 313,319 **** String literal = SQLQueryUtil.escapeString(comparisonValue); String condition = null; ! if (recType != null) { try { ! RecordDescriptor metadata = DataRegistryImpl.getDefaultRegistry().getMetadata(recType); if (tableName == null) { tableName = metadata.getTableName(); --- 325,332 ---- String literal = SQLQueryUtil.escapeString(comparisonValue); String condition = null; ! RecordDescriptor metadata = null; ! if (recType != null) { try { ! metadata = DataRegistryImpl.getDefaultRegistry().getMetadata(recType); if (tableName == null) { tableName = metadata.getTableName(); *************** *** 365,369 **** literal = SQLQueryUtil.fixInQuery(literal); break; ! } String f = caseInsensitive ? " LOWER(" + fieldName + ")" : fieldName; sqlQuery += "FROM " + tableName + " WHERE " + f + condition + literal; --- 378,382 ---- literal = SQLQueryUtil.fixInQuery(literal); break; ! } String f = caseInsensitive ? " LOWER(" + fieldName + ")" : fieldName; sqlQuery += "FROM " + tableName + " WHERE " + f + condition + literal; |
|
From: Enrique R. <las...@us...> - 2005-03-10 16:55:52
|
Update of /cvsroot/canyamo/oreo/src/org/oreodata/predicates In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32415 Modified Files: SimplePredicate.java SQLQueryUtil.java Log Message: Clausulas IN y NOT_IN ahora se le puede pasar un string (valor1, valor2) Solucionado posible classcast exception con caseInsensitive y busquedas con objectos no string Index: SQLQueryUtil.java =================================================================== RCS file: /cvsroot/canyamo/oreo/src/org/oreodata/predicates/SQLQueryUtil.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** SQLQueryUtil.java 10 Feb 2004 18:39:21 -0000 1.2 --- SQLQueryUtil.java 10 Mar 2005 16:55:39 -0000 1.3 *************** *** 204,206 **** --- 204,225 ---- return length == slength; } + + /** + * Fix an IN or NOT IN query. Sometimes oreo user pass a string with a + * coma separated string. Oreo add an ' becouse it is a string. + * + * This method fix this kind queries. + * @param literal with a coma separated string + * @return literal with a coma based separated string that start withs a ( + * and end with ) + */ + static public String fixInQuery(String literal){ + if (literal.startsWith("'") && literal.endsWith("'")){ + literal = literal.substring(1, literal.length()-1); + } + if (!literal.startsWith("(") && !literal.endsWith(")")){ + literal = "("+literal+")"; + } + return literal; + } } Index: SimplePredicate.java =================================================================== RCS file: /cvsroot/canyamo/oreo/src/org/oreodata/predicates/SimplePredicate.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** SimplePredicate.java 10 Feb 2004 18:46:23 -0000 1.2 --- SimplePredicate.java 10 Mar 2005 16:55:38 -0000 1.3 *************** *** 107,114 **** } this.comparisonType = comparisonType; ! this.comparisonValue = caseInsensitive ? ((String) comparisonValue).toLowerCase() : comparisonValue; this.fieldName = fieldName; this.comparator = comparator; ! this.recType = recType; this.caseInsensitive = caseInsensitive; } --- 107,118 ---- } this.comparisonType = comparisonType; ! if (comparisonValue instanceof String){ ! this.comparisonValue = caseInsensitive ? ((String) comparisonValue).toLowerCase() : comparisonValue; ! } else { ! this.comparisonValue = comparisonValue; ! } this.fieldName = fieldName; this.comparator = comparator; ! this.recType = recType; this.caseInsensitive = caseInsensitive; } *************** *** 222,226 **** case GREATER_THAN_EQUALS: return compare(val, comparisonValue) >= 0; ! case LIKE: { if (val != null) { --- 226,230 ---- case GREATER_THAN_EQUALS: return compare(val, comparisonValue) >= 0; ! case LIKE: { if (val != null) { *************** *** 355,365 **** case NOT_IN: condition = " NOT IN "; break; case IN: condition = " IN "; break; } String f = caseInsensitive ? " LOWER(" + fieldName + ")" : fieldName; ! sqlQuery += "FROM " + tableName + " WHERE " + f + condition + literal; } --- 359,371 ---- case NOT_IN: condition = " NOT IN "; + literal = SQLQueryUtil.fixInQuery(literal); break; case IN: condition = " IN "; + literal = SQLQueryUtil.fixInQuery(literal); break; } String f = caseInsensitive ? " LOWER(" + fieldName + ")" : fieldName; ! sqlQuery += "FROM " + tableName + " WHERE " + f + condition + literal; } |
|
From: Enrique R. <las...@us...> - 2005-02-18 18:11:03
|
Update of /cvsroot/canyamo/oreo In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11001 Modified Files: build.xml Log Message: añadido target para generar metadata de las tablas Index: build.xml =================================================================== RCS file: /cvsroot/canyamo/oreo/build.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** build.xml 15 Jul 2003 16:18:14 -0000 1.1 --- build.xml 18 Feb 2005 18:10:54 -0000 1.2 *************** *** 27,35 **** </target> <target name="compile"> <javac srcdir="src" classpathref="oreo.classpath" depend="on" ! debug="off" /> </target> --- 27,45 ---- </target> + <target name="metadata"> + <java fork="true" classname="org.oreodata.extratools.LoadDbMetaData" classpathref="oreo.classpath" > + <arg value="jdbc:postgresql://SERVER/DATABASE?charSet=LATIN9"/> + <arg value="user"/> + <arg value="password"/> + <arg value="tablename"/> + <arg value="org.postgresql.Driver"/> + </java> + </target> + <target name="compile"> <javac srcdir="src" classpathref="oreo.classpath" depend="on" ! debug="on" /> </target> |
|
From: Roberto S. <rs...@us...> - 2004-12-10 10:01:38
|
Update of /cvsroot/canyamo/canyamo-apps/items/conf In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27121/items/conf Modified Files: app.xml Log Message: nuevo listado de items por fecha Index: app.xml =================================================================== RCS file: /cvsroot/canyamo/canyamo-apps/items/conf/app.xml,v retrieving revision 1.31 retrieving revision 1.32 diff -C2 -d -r1.31 -r1.32 *** app.xml 11 Nov 2004 13:32:31 -0000 1.31 --- app.xml 10 Dec 2004 10:01:12 -0000 1.32 *************** *** 242,245 **** --- 242,254 ---- + <action + class="org.javahispano.web.apps.items.ListByDateAction" + name="bydate" + displayer="news.bydate" + > + <property name="date-format" value="dd-MM-yyyy"/> + <property name="date-field" value="fecha"/> + </action> + </actions> *************** *** 347,350 **** --- 356,365 ---- </displayer> + <displayer + class="org.javahispano.canyamo.services.presentation.template.GenericTemplateDisplayer" + name="bydate" + > + <property name="template" value="items/bydate.html"/> + </displayer> </displayers> |
|
From: Roberto S. <rs...@us...> - 2004-12-10 10:00:59
|
Update of /cvsroot/canyamo/canyamo-apps/items/presentation In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27049/items/presentation Added Files: bydate.html Log Message: nuevo listado de items por fecha --- NEW FILE: bydate.html --- <#function nombreMes x> <#if x == "0"><#return "Enero"> <#elseif x == "1"><#return "Febrero"> <#elseif x == "2"><#return "Marzo"> <#elseif x == "3"><#return "Abril"> <#elseif x == "4"><#return "Mayo"> <#elseif x == "5"><#return "Junio"> <#elseif x == "6"><#return "Julio"> <#elseif x == "7"><#return "Agosto"> <#elseif x == "8"><#return "Septiembre"> <#elseif x == "9"><#return "Octubre"> <#elseif x == "10"><#return "Noviembre"> <#elseif x == "11"><#return "Diciembre"> <#else><#return ""> </#if> </#function> <div id="sec_eventos"> <div class="pag_portada"> <h1><span>EVENTOS</span></h1> <#if type?exists> <h2><span>${type.text}</span></h2> </#if> <div class="eventos"> <div class="calendario"> <div class="cal"> <table cellspacing="1" cellpadding="0" summary="Calendario que marca los días con eventos"> <tr> <th colspan="7"><span class="mes"><span>${nombreMes(month)} de ${year}</span></span></th> </tr> <tr> <th><span class="semana"><span>Lun.</span></span></th> <th><span class="semana"><span>Mar.</span></span></th> <th><span class="semana"><span>Mié.</span></span></th> <th><span class="semana"><span>Jue.</span></span></th> <th><span class="semana"><span>Vie.</span></span></th> <th><span class="semana"><span>Sáb.</span></span></th> <th><span class="domingo"><span>Dom.</span></span></th> </tr> <#list calendar as week > <tr> <#list week as day> <td> <#if day.day == 0> <span class="vacio"><span> </span></span> <#elseif day.events=="false"> <span class="sin_evento"><span>${day.day}</span></span> <#elseif day.selected=="true"> <a class="on" href="events.list.action?day=${day.day}&month=${month}&year=${year}"><span>${day.day}</span></a> <#else> <a href="events.list.action?day=${day.day}&month=${month}&year=${year}"><span>${day.day}</span></a> </#if> </td> </#list> </tr> </#list> </table> <div class="leyenda"> <div class="elemento"> <div class="con_evento"></div> <div class="texto">Día con eventos</div> <div class="fake"></div> </div> <div class="elemento"> <div class="seleccionado"></div> <div class="texto">Día seleccionado</div> <div class="fake"></div> </div> </div> <!-- leyenda --> </div> <!-- cal --> <div class="form"> <h3>Seleccione mes y año</h3> <form action="events.list.action"> <div class="campo"> <select name="month"> <option value="0" <#if month=="0">selected="selected"</#if> label="${nombreMes("0")}">${nombreMes("0")}</option> <option value="1" <#if month=="1">selected="selected"</#if> label="${nombreMes("1")}">${nombreMes("1")}</option> <option value="2" <#if month=="2">selected="selected"</#if> label="${nombreMes("2")}">${nombreMes("2")}</option> <option value="3" <#if month=="3">selected="selected"</#if> label="${nombreMes("3")}">${nombreMes("3")}</option> <option value="4" <#if month=="4">selected="selected"</#if> label="${nombreMes("4")}">${nombreMes("4")}</option> <option value="5" <#if month=="5">selected="selected"</#if> label="${nombreMes("5")}">${nombreMes("5")}</option> <option value="6" <#if month=="6">selected="selected"</#if> label="${nombreMes("6")}">${nombreMes("6")}</option> <option value="7" <#if month=="7">selected="selected"</#if> label="${nombreMes("7")}">${nombreMes("7")}</option> <option value="8" <#if month=="8">selected="selected"</#if> label="${nombreMes("8")}">${nombreMes("8")}</option> <option value="9" <#if month=="9">selected="selected"</#if> label="${nombreMes("9")}">${nombreMes("9")}</option> <option value="10" <#if month=="10">selected="selected"</#if> label="${nombreMes("10")}">${nombreMes("10")}</option> <option value="11" <#if month=="11">selected="selected"</#if> label="${nombreMes("11")}">${nombreMes("11")}</option> </select> <select name="year"> <option value="${year?number - 2}" label="${year?number - 2}" >${year?number - 2}</option> <option value="${year?number - 1}" label="${year?number - 1}" >${year?number - 1}</option> <option value="${year?number}" label="${year?number}" selected="selected">${year?number}</option> <option value="${year?number + 1}" label="${year?number + 1}">${year?number + 1}</option> <option value="${year?number + 2}" label="${year?number + 2}">${year?number + 2}</option> </select> </div> <div class="botones"> <input class="boton1" type="submit" name="enviar" value="Ir" /> </div> </form> </div> <!-- form --> <div class="fake"></div> </div> <!-- calendario --> <div class="fake"></div> <hr class="hidden" /> </div> <!-- eventos --> <#if onlyDay=="true" > <h2><span>Eventos del día <strong>${day} de ${nombreMes(month)} de ${year}</strong>.</span></h2> <#else> <h2><span>Eventos del mes <strong>${nombreMes(month)} de ${year}</strong>.</span></h2> </#if> <div class="eventos"> <#if items.size()<=0> <div class="error">No hay eventos</div> <#else> <ul> <#list items as item> <li> <h3><a href="events.item.action?id=${item.id}">${item.name}</a></h3> tipo: <a href="eventsmulti.last.action?type_id=${item.type}">${types[item.type]}</a> <div class="fecha">${item.fecha?string("dd-MM-yyyy")}</div> <div class="cuerpo"><transform cutText; size=200>${item.description}</transform></div> <hr class="hidden" /> </li> </#list> </ul> </#if> <div class="fake"></div> </div> <!-- eventos --> <div class="fake"></div> </div> <!-- pag_portada --> </div> <!-- sec_eventos --> |
|
From: Roberto S. <rs...@us...> - 2004-12-02 09:58:34
|
Update of /cvsroot/canyamo/canyamo-apps/users/src/org/javahispano/web/apps/users/login In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1412 Modified Files: LogoutAction.java Log Message: Introducir de nuevo el tema en la sesión Index: LogoutAction.java =================================================================== RCS file: /cvsroot/canyamo/canyamo-apps/users/src/org/javahispano/web/apps/users/login/LogoutAction.java,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** LogoutAction.java 24 Aug 2003 08:54:06 -0000 1.9 --- LogoutAction.java 2 Dec 2004 09:58:10 -0000 1.10 *************** *** 23,49 **** import org.javahispano.canyamo.core.action.TransparentAction; import org.javahispano.canyamo.core.config.CanyamoConfig; ! import org.javahispano.canyamo.services.user.User; /** ! * Performs logout * ! *@author <a href="mailto:al AT javahispano DOT org">Alberto Molpeceres</a> ! *@version */ public class LogoutAction extends AbstractAction ! implements TransparentAction { ! ! /** ! * Action's process method <br> ! * Actually destroys user's session ! * ! *@param data User's respuest/response ! */ ! public void process(WorkData data) { ! data.invalidateSession(); ! data.setSessionAttribute(User.SESSION_ATTRIBUTE, CanyamoConfig.getValue("default_user")); ! } ! ! } --- 23,48 ---- import org.javahispano.canyamo.core.action.TransparentAction; import org.javahispano.canyamo.core.config.CanyamoConfig; ! import org.javahispano.canyamo.services.lf.themes.Theme; import org.javahispano.canyamo.services.user.User; /** ! * Performs logout * ! * @author <a href="mailto:al AT javahispano DOT org">Alberto Molpeceres</a> */ public class LogoutAction extends AbstractAction ! implements TransparentAction { + /** + * Action's process method <br> + * Actually destroys user's session + * + * @param data User's respuest/response + */ + public void process(WorkData data) { + Theme theme = data.getTheme(); + data.invalidateSession(); + data.setSessionAttribute(User.SESSION_ATTRIBUTE, CanyamoConfig.getValue("default_user")); + data.setSessionAttribute(Theme.SESSION_ATTRIBUTE, theme); + } + } \ No newline at end of file |
|
From: Roberto S. <rs...@us...> - 2004-11-16 15:39:39
|
Update of /cvsroot/canyamo/canyamo-apps/portal/src/org/javahispano/web/apps/myportal In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14632/src/org/javahispano/web/apps/myportal Modified Files: Layout.java MyPortalDisplayer.java Log Message: no produce una excepcion cuando no encuentra un portlet sino que escribe un mensaje en la web Index: MyPortalDisplayer.java =================================================================== RCS file: /cvsroot/canyamo/canyamo-apps/portal/src/org/javahispano/web/apps/myportal/MyPortalDisplayer.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** MyPortalDisplayer.java 10 Sep 2004 11:13:23 -0000 1.3 --- MyPortalDisplayer.java 16 Nov 2004 15:39:26 -0000 1.4 *************** *** 19,83 **** package org.javahispano.web.apps.myportal; import org.javahispano.canyamo.core.WorkData; import org.javahispano.canyamo.core.display.AbstractDisplayer; - import org.javahispano.canyamo.core.CanyamoError; - import org.javahispano.canyamo.core.CanyamoException; import java.io.Writer; /** ! * Shows the personalized portal for an user, or the default user if ! * the user hasn't a configuration yet. ! * <br> ! * * ! *@author <a href="mailto:al AT javahispano DOT org">Alberto Molpeceres</a> ! *@since 20 August 2004 ! *@version */ public class MyPortalDisplayer extends AbstractDisplayer { ! /** ! * Retrieves a small text explaining what this displayer does ! * ! *@return Description text ! */ ! public String getDescription() { ! return "Displayer to show the personlized portal for an user."; ! } ! /** ! * Renders the view of this displayer for the given user's request. <br> ! * ! * ! *@param data user's working data ! *@since ! */ ! public void renderView(WorkData data) throws Exception{ ! try{ ! Writer w = data.getOutputWriter(); ! Layout layout = LayoutManager.getInstance().getLayout(data); ! w.write("<table class=\"myportal\" cellpadding=\"0\" border=\"0\" width=\"100%\"><tbody class=\"myportal\"><tr class=\"myportal\" valign=\"top\">"); ! if (layout.hasFirstColumn()){ ! layout.renderFirstColumn(data); ! } ! if (layout.hasSecondColumn()){ ! layout.renderSecondColumn(data); ! } ! if (layout.hasThirdColumn()){ ! layout.renderThirdColumn(data); ! } ! w.write("</tr></tbody></table>"); ! } ! catch(Exception e){ ! throw new CanyamoError("Error generando MyPortal: " + e.getMessage()); } ! } ! ! ! } ! --- 19,74 ---- package org.javahispano.web.apps.myportal; + import org.javahispano.canyamo.core.CanyamoError; import org.javahispano.canyamo.core.WorkData; import org.javahispano.canyamo.core.display.AbstractDisplayer; import java.io.Writer; /** ! * Shows the personalized portal for an user, or the default user if ! * the user hasn't a configuration yet. ! * <br> * ! * @author <a href="mailto:al AT javahispano DOT org">Alberto Molpeceres</a> ! * @since 20 August 2004 */ public class MyPortalDisplayer extends AbstractDisplayer { ! /** ! * Retrieves a small text explaining what this displayer does ! * ! * @return Description text ! */ ! public String getDescription() { ! return "Displayer to show the personlized portal for an user."; ! } ! /** ! * Renders the view of this displayer for the given user's request. <br> ! * ! * @param data user's working data ! */ ! public void renderView(WorkData data) throws Exception { ! try { ! Writer w = data.getOutputWriter(); ! Layout layout = LayoutManager.getInstance().getLayout(data); ! w.write("<table class=\"myportal\" cellpadding=\"0\" border=\"0\" width=\"100%\"><tbody class=\"myportal\"><tr class=\"myportal\" valign=\"top\">"); ! if (layout.hasFirstColumn()) { ! layout.renderFirstColumn(data); ! } ! if (layout.hasSecondColumn()) { ! layout.renderSecondColumn(data); ! } ! if (layout.hasThirdColumn()) { ! layout.renderThirdColumn(data); ! } ! w.write("</tr></tbody></table>"); ! } catch (Exception e) { ! throw new CanyamoError("Error generando MyPortal: " + e.getMessage(), e); ! } } ! } \ No newline at end of file Index: Layout.java =================================================================== RCS file: /cvsroot/canyamo/canyamo-apps/portal/src/org/javahispano/web/apps/myportal/Layout.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Layout.java 22 Aug 2004 11:33:08 -0000 1.2 --- Layout.java 16 Nov 2004 15:39:25 -0000 1.3 *************** *** 19,132 **** package org.javahispano.web.apps.myportal; - import org.javahispano.canyamo.services.persistence.PersistenceException; - import org.javahispano.canyamo.services.persistence.DbObject; import org.javahispano.canyamo.core.WorkData; import org.javahispano.canyamo.core.display.Displayer; import org.javahispano.canyamo.core.display.DisplayerManager; - import java.util.List; - import java.util.ArrayList; - import java.util.Iterator; - import java.util.Collections; - import java.util.StringTokenizer; import java.io.Writer; /** ! * Represents the portal layout for an user. ! * <br> ! * * ! *@author <a href="mailto:al AT javahispano DOT org">Alberto Molpeceres</a> ! *@since 20 August 2004 ! *@version */ public class Layout { ! private static final String BR = "<br/>"; ! private DbObject dbo = null; ! private List first; ! private List second; ! private List third; ! Layout (DbObject dbo) throws PersistenceException{ ! this.dbo = dbo; ! first = getContentAsList(dbo.get("col1_content")); ! second = getContentAsList(dbo.get("col2_content")); ! third = getContentAsList(dbo.get("col3_content")); ! } ! private List getContentAsList(Object content){ ! if (content == null){ ! return Collections.EMPTY_LIST; } ! List result = new ArrayList(); ! StringTokenizer st = new StringTokenizer((String) content, ","); ! String portlet; ! while(st.hasMoreTokens()){ ! portlet = st.nextToken().trim(); ! result.add(portlet); } - return result; - } ! public boolean hasFirstColumn() throws PersistenceException{ ! return hasColumn("col1_width"); ! } ! public boolean hasSecondColumn() throws PersistenceException{ ! return hasColumn("col2_width"); ! } ! public boolean hasThirdColumn() throws PersistenceException{ ! return hasColumn("col3_width"); ! } ! private boolean hasColumn(String columName) throws PersistenceException{ ! Integer col = (Integer)dbo.get(columName); ! return col.intValue() >= 0; ! } ! public int getFirstWidth() throws PersistenceException{ ! return getWidth("col1_width"); ! } ! public int getSecondWidth() throws PersistenceException{ ! return getWidth("col2_width"); ! } ! public int getThridWidth() throws PersistenceException{ ! return getWidth("col3_width"); ! } ! private int getWidth(String columName) throws PersistenceException{ ! Integer col = (Integer)dbo.get(columName); ! return col.intValue(); ! } ! public List getFirstColumn(){ ! return Collections.unmodifiableList(first); ! } ! public List getSecondColumn(){ ! return Collections.unmodifiableList(second); ! } ! public List getThirdColumn(){ ! return Collections.unmodifiableList(third); ! } ! void renderFirstColumn(WorkData data) throws Exception{ ! renderColumn(data, first, getFirstWidth()); ! } ! void renderSecondColumn(WorkData data) throws Exception{ ! renderColumn(data, second, getSecondWidth()); ! } ! void renderThirdColumn(WorkData data) throws Exception{ ! renderColumn(data, third, getThridWidth()); ! } ! void renderColumn(WorkData data, List colum, int width) throws Exception{ ! Iterator i = colum.iterator(); ! String portlet; ! Writer w = data.getOutputWriter(); ! w.write("<td class=\"myportal\" width=\"" + width + "%\" >"); ! while (i.hasNext()){ ! portlet = (String)i.next(); ! DisplayerManager.getInstance().getDisplayer(portlet).renderView(data); ! w.write(BR); } - w.write("</td>"); - } } \ No newline at end of file --- 19,143 ---- package org.javahispano.web.apps.myportal; import org.javahispano.canyamo.core.WorkData; import org.javahispano.canyamo.core.display.Displayer; import org.javahispano.canyamo.core.display.DisplayerManager; + import org.javahispano.canyamo.services.persistence.DbObject; + import org.javahispano.canyamo.services.persistence.PersistenceException; import java.io.Writer; + import java.util.*; /** ! * Represents the portal layout for an user. ! * <br> * ! * @author <a href="mailto:al AT javahispano DOT org">Alberto Molpeceres</a> ! * @since 20 August 2004 */ public class Layout { ! private static final String BR = "<br/>"; ! private DbObject dbo = null; ! private List first; ! private List second; ! private List third; ! Layout(DbObject dbo) throws PersistenceException { ! this.dbo = dbo; ! first = getContentAsList(dbo.get("col1_content")); ! second = getContentAsList(dbo.get("col2_content")); ! third = getContentAsList(dbo.get("col3_content")); ! } ! private List getContentAsList(Object content) { ! if (content == null) { ! return Collections.EMPTY_LIST; ! } ! List result = new ArrayList(); ! StringTokenizer st = new StringTokenizer((String) content, ","); ! String portlet; ! while (st.hasMoreTokens()) { ! portlet = st.nextToken().trim(); ! result.add(portlet); ! } ! return result; } ! ! public boolean hasFirstColumn() throws PersistenceException { ! return hasColumn("col1_width"); } ! public boolean hasSecondColumn() throws PersistenceException { ! return hasColumn("col2_width"); ! } ! public boolean hasThirdColumn() throws PersistenceException { ! return hasColumn("col3_width"); ! } ! private boolean hasColumn(String columName) throws PersistenceException { ! Integer col = (Integer) dbo.get(columName); ! return col.intValue() >= 0; ! } + public int getFirstWidth() throws PersistenceException { + return getWidth("col1_width"); + } ! public int getSecondWidth() throws PersistenceException { ! return getWidth("col2_width"); ! } ! ! public int getThridWidth() throws PersistenceException { ! return getWidth("col3_width"); ! } ! ! private int getWidth(String columName) throws PersistenceException { ! Integer col = (Integer) dbo.get(columName); ! return col.intValue(); ! } ! ! public List getFirstColumn() { ! return Collections.unmodifiableList(first); ! } ! ! public List getSecondColumn() { ! return Collections.unmodifiableList(second); ! } ! ! public List getThirdColumn() { ! return Collections.unmodifiableList(third); ! } ! ! ! void renderFirstColumn(WorkData data) throws Exception { ! renderColumn(data, first, getFirstWidth()); ! } ! ! void renderSecondColumn(WorkData data) throws Exception { ! renderColumn(data, second, getSecondWidth()); ! } ! ! void renderThirdColumn(WorkData data) throws Exception { ! renderColumn(data, third, getThridWidth()); ! } ! ! void renderColumn(WorkData data, List colum, int width) throws Exception { ! Iterator i = colum.iterator(); ! String portlet; ! Writer w = data.getOutputWriter(); ! w.write("<td class=\"myportal\" width=\"" + width + "%\" >"); ! while (i.hasNext()) { ! portlet = (String) i.next(); ! ! Displayer displayer = DisplayerManager.getInstance().getDisplayer(portlet); ! if (displayer != null) { ! displayer.renderView(data); ! } else { ! w.write(portlet + " not found."); ! } ! w.write(BR); ! } ! w.write("</td>"); } } \ No newline at end of file |
|
From: Roberto S. <rs...@us...> - 2004-11-15 19:20:41
|
Update of /cvsroot/canyamo/canyamo-apps/forum/conf In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4318 Modified Files: app.xml Log Message: cambio de paquete de commons Index: app.xml =================================================================== RCS file: /cvsroot/canyamo/canyamo-apps/forum/conf/app.xml,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** app.xml 4 Aug 2004 21:00:16 -0000 1.18 --- app.xml 15 Nov 2004 19:20:31 -0000 1.19 *************** *** 69,73 **** <action ! class="org.javahispano.web.apps.commons.BlankAction" name="add" displayer="forums.add" --- 69,73 ---- <action ! class="org.canyamo.apps.commons.BlankAction" name="add" displayer="forums.add" |
|
From: Alberto M. <mo...@us...> - 2004-11-15 15:13:49
|
Update of /cvsroot/canyamo/canyamo-apps/text/presentation In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15289/presentation Modified Files: viewer.html Log Message: eliminadas las comillas en las compraciones booleanas Index: viewer.html =================================================================== RCS file: /cvsroot/canyamo/canyamo-apps/text/presentation/viewer.html,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** viewer.html 23 Jul 2004 11:55:48 -0000 1.9 --- viewer.html 15 Nov 2004 15:13:39 -0000 1.10 *************** *** 1 **** ! <if editable == "true"> <a href="text.editor.action?file=${fileName}">Edit this file</a><br/> </if> <br/> ${fileData} <br/><br/> <div align="right"> <i>Editado por ${lastEditor} (${lastChanged?date})</i> </div> <br/> <if editable == "true"> <a href="text.editor.action?file=${fileName}">Edit this file</a><br/> </if> \ No newline at end of file --- 1,13 ---- ! <if editable == true> ! <a href="text.editor.action?file=${fileName}">Edit this file</a><br/> ! </if> ! <br/> ! ${fileData} ! <br/><br/> ! <div align="right"> ! <i>Editado por ${lastEditor} (${lastChanged?date})</i> ! </div> ! <br/> ! <if editable == true> ! <a href="text.editor.action?file=${fileName}">Edit this file</a><br/> ! </if> |
|
From: Roberto S. <rs...@us...> - 2004-11-12 13:28:06
|
Update of /cvsroot/canyamo/canyamo-apps/items/presentation In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27410 Modified Files: news.html Added Files: item_detail.html Log Message: detalle en una nueva plantilla --- NEW FILE: item_detail.html --- <a href="news.item.action?id=${item.id}"><h2 class="${item.type}">${item.title}</h2></a> <div class="itemMetaData"> Publicada por <a href="user.profile.action?user=${item.author}">${item.author}</a> el ${item.date?string("EEEE dd MMMM yyyy hh:mm")}<br/> <span class="help" title="Universal Resource Locator">URL</span> de la noticia: <a href="${item.url}">${item.url}</a> <br/><#if item.visits?exists>${item.visits}<#else>0</#if> lecturas. </div> <div class="itemBody"> <p>${item.body}</p> <#if editable==true> <div class="adminOptions"> <a class="admin" href="news.edit.action?id=${item.id}">Editar</a> | <a class="admin" href="news.remove.action?id=${item.id}">Eliminar</a> </div> </#if> </div> Index: news.html =================================================================== RCS file: /cvsroot/canyamo/canyamo-apps/items/presentation/news.html,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** news.html 11 Nov 2004 23:30:33 -0000 1.12 --- news.html 12 Nov 2004 13:27:56 -0000 1.13 *************** *** 6,32 **** <!-- BEGIN NOTICIA ${item.id} --> ! <a href="news.item.action?id=${item.id}"><h2 class="${item.type}">${item.title}</h2></a> ! ! <div class="itemMetaData"> ! Publicada por <a href="user.profile.action?user=${item.author}">${item.author}</a> el ${item.date?string("EEEE dd MMMM yyyy hh:mm")}<br/> ! <span class="help" title="Universal Resource Locator">URL</span> de la noticia: <a href="${item.url}">${item.url}</a> ! <br/>${item.visits} lecturas. ! </div> ! ! <div class="itemBody"> ! <p>${item.body}</p> ! <#if editable==true> ! <div class="adminOptions"> ! <a class="admin" href="news.edit.action?id=${item.id}">Editar</a> | ! <a class="admin" href="news.remove.action?id=${item.id}">Eliminar</a> ! </div> ! </#if> ! </div> <!-- END NOTICIA ${item.id} --> - <#if item.approved=="n"> - <p><strong>Nota Importante:</strong> Este elemento no se mostrará hasta que un administrador lo apruebe.</p> - </#if> - <h3>Comentarios</h3> <#assign i=1/> --- 6,12 ---- <!-- BEGIN NOTICIA ${item.id} --> ! <#include "item_detail.html" parse=true> <!-- END NOTICIA ${item.id} --> <h3>Comentarios</h3> <#assign i=1/> *************** *** 54,58 **** <textarea class="textfield" name="comment" class="entradatexto" rows="8" cols="40" wrap="physical"></textarea> ! <p>Acepta las etiquetas B, I, U, OL, UL, LI, A y BR. Interpreta los saltos de línea como BR.</p> <div class="botonera"> --- 34,38 ---- <textarea class="textfield" name="comment" class="entradatexto" rows="8" cols="40" wrap="physical"></textarea> ! <p>Acepta las etiquetas B, I, U, OL, UL, LI, A y BR. Interpreta los saltos de línea como BR.</p> <div class="botonera"> |
|
From: Roberto S. <rs...@us...> - 2004-11-12 13:14:32
|
Update of /cvsroot/canyamo/canyamo-apps/users/presentation/login In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24115 Modified Files: loged.html Log Message: no message Index: loged.html =================================================================== RCS file: /cvsroot/canyamo/canyamo-apps/users/presentation/login/loged.html,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** loged.html 26 Sep 2004 11:27:56 -0000 1.13 --- loged.html 12 Nov 2004 13:14:18 -0000 1.14 *************** *** 1,10 **** <div id="desktop"> <h3>${userName}</h3> ! <a class="icon" href="portal.myedit.action" title="Personaliza Cáñamo">MyCanyamo</a><br/> ! <a class="icon" href="commons.admin.action" title="Configura tu cuenta">Administración</a><br/> <a class="icon" href="news.addform.action" title="Publica una noticia!">Publicar noticia</a><br/> ! <a class="icon" href="text.view.action?file=manual" title="¿Necesitas ayuda para usar Cáñamo?">Ayuda</a><br/> ! <a class="icon" href="forums.list.action?forum=3" title="Foro público para avisar de errores">Errores</a><br/> ! <a class="icon" href="user.logout.action" title="¡Vuelve pronto!">Desconectar</a><br/> </div> --- 1,10 ---- <div id="desktop"> <h3>${userName}</h3> ! <a class="icon" href="portal.myedit.action" title="Personaliza Cáñamo">MyCanyamo</a><br/> ! <a class="icon" href="commons.admin.action" title="Configura tu cuenta">Administración</a><br/> <a class="icon" href="news.addform.action" title="Publica una noticia!">Publicar noticia</a><br/> ! <a class="icon" href="text.view.action?file=manual" title="¿Necesitas ayuda para usar Cáñamo?">Ayuda</a><br/> ! <a class="icon" href="forums.list.action?forum=3" title="Foro público para avisar de errores">Errores</a><br/> ! <a class="icon" href="user.logout.action" title="¡Vuelve pronto!">Desconectar</a><br/> </div> |
|
From: Roberto S. <rs...@us...> - 2004-11-12 13:14:06
|
Update of /cvsroot/canyamo/canyamo-apps/portal/db-schema In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23953 Added Files: myportal-pgsql.sql Log Message: no message --- NEW FILE: myportal-pgsql.sql --- DROP TABLE users_layouts; create table users_layouts( "login" character varying(12) not null, "col1_content" character varying(255), "col2_content" character varying(255), "col3_content" character varying(255), "col1_width" integer not null default 50, "col2_width" integer not null default 25, "col3_width" integer not null default 25, primary key (login) ); INSERT INTO "users_layouts" ( "login" , "col1_content" , "col2_content" , "col3_content" , "col1_width" , "col2_width" , "col3_width" ) VALUES ('anonymous', 'news.portlet', 'forums.portlet,polls.portlet', 'user.login,text.portlet-ring', '50', '25', '25'); |
|
From: Roberto S. <rs...@us...> - 2004-11-12 13:13:17
|
Update of /cvsroot/canyamo/canyamo-apps/commons/presentation In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23714/presentation Modified Files: adminactions.html Log Message: no message Index: adminactions.html =================================================================== RCS file: /cvsroot/canyamo/canyamo-apps/commons/presentation/adminactions.html,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** adminactions.html 2 Aug 2004 16:48:17 -0000 1.5 --- adminactions.html 12 Nov 2004 13:13:05 -0000 1.6 *************** *** 1,12 **** <div id="view"> <h2>Acciones de administración</h2> ! <#list actions as role> ! <br /><br /> ! Rol: <b>${role.name}</b><br /> ! <ul> ! <#list role.actions as action> ! <li><a href="${action.link}">${action.name}</a></li> ! </#list> ! </ul> ! </#list> </div> --- 1,12 ---- <div id="view"> <h2>Acciones de administración</h2> ! <#list actions as role> ! <br /><br /> ! Rol: <b>${role.name}</b><br /> ! <ul> ! <#list role.actions as action> ! <li><a href="${action.link}">${action.name}</a></li> ! </#list> ! </ul> ! </#list> </div> |
|
From: Roberto S. <rs...@us...> - 2004-11-12 13:13:17
|
Update of /cvsroot/canyamo/canyamo-apps/commons/conf In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23714/conf Modified Files: adminactions.xml Log Message: no message Index: adminactions.xml =================================================================== RCS file: /cvsroot/canyamo/canyamo-apps/commons/conf/adminactions.xml,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** adminactions.xml 30 Aug 2004 15:22:30 -0000 1.16 --- adminactions.xml 12 Nov 2004 13:13:04 -0000 1.17 *************** *** 1,3 **** ! <?xml version="1.0"?> <adminactions> --- 1,3 ---- ! <?xml version="1.0" encoding="iso-8859-15"?> <adminactions> *************** *** 18,29 **** <role name="admin"> <action name="Aplicaciones instaladas" link="commons.listapps.action" /> ! <action name="Instalar Aplicacion" link="commons.addapp.action" /> <action name="Comentarios" link="comments.admin.action" /> ! <action name="Anyadir imagenes" link="text.addimageform.action" /> <action name="Eliminar imagenes" link="text.imageadmin.action" /> <action name="Comentarios para registrados" link="regcomments.admin.action" /> <action name="Usuarios" link="user.admin.action" /> <action name="Ficheros de texto" link="text.admin.action" /> ! <action name="Administrar articulos" link="articles.admsections.action" /> <action name="Foros" link="forums.admin.action" /> <action name="Encuestas" link="polls.admin.action" /> --- 18,29 ---- <role name="admin"> <action name="Aplicaciones instaladas" link="commons.listapps.action" /> ! <action name="Instalar Aplicaci&oacute;n" link="commons.addapp.action" /> <action name="Comentarios" link="comments.admin.action" /> ! <action name="A&ntilde;adir imagenes" link="text.addimageform.action" /> <action name="Eliminar imagenes" link="text.imageadmin.action" /> <action name="Comentarios para registrados" link="regcomments.admin.action" /> <action name="Usuarios" link="user.admin.action" /> <action name="Ficheros de texto" link="text.admin.action" /> ! <action name="Administrar art&iacute;culos" link="articles.admsections.action" /> <action name="Foros" link="forums.admin.action" /> <action name="Encuestas" link="polls.admin.action" /> |
|
From: Roberto S. <rs...@us...> - 2004-11-12 09:27:22
|
Update of /cvsroot/canyamo/canyamo-apps/items/src/org/javahispano/web/apps/items In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5755 Modified Files: NewItemFormAction.java Log Message: no message Index: NewItemFormAction.java =================================================================== RCS file: /cvsroot/canyamo/canyamo-apps/items/src/org/javahispano/web/apps/items/NewItemFormAction.java,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** NewItemFormAction.java 11 Nov 2004 11:05:22 -0000 1.14 --- NewItemFormAction.java 12 Nov 2004 09:27:14 -0000 1.15 *************** *** 56,60 **** data.setAttribute("types", types); } ! data.setAttribute("item", ItemProvider.getInstance().getAccessor(app).getItem(getApplication().getProperty("items-table"), null)); } --- 56,60 ---- data.setAttribute("types", types); } ! data.setAttribute("item", ItemProvider.getInstance().getAccessor(app).getItem(getApplication().getProperty("items-table"), data)); } |
|
From: Roberto S. <rs...@us...> - 2004-11-11 23:38:50
|
Update of /cvsroot/canyamo/canyamo-apps/portal/presentation/myportal In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18699/portal/presentation/myportal Modified Files: saved.html Log Message: # para usar freemarker 2.3 y tildes Index: saved.html =================================================================== RCS file: /cvsroot/canyamo/canyamo-apps/portal/presentation/myportal/saved.html,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** saved.html 30 Aug 2004 15:25:55 -0000 1.1 --- saved.html 11 Nov 2004 23:38:41 -0000 1.2 *************** *** 1,3 **** <p> ! Configuración guardada con éxito. </p> \ No newline at end of file --- 1,3 ---- <p> ! Configuración guardada con éxito. </p> \ No newline at end of file |
|
From: Roberto S. <rs...@us...> - 2004-11-11 23:38:50
|
Update of /cvsroot/canyamo/canyamo-apps/portal/presentation In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18699/portal/presentation Modified Files: rss.html stats.html Log Message: # para usar freemarker 2.3 y tildes Index: rss.html =================================================================== RCS file: /cvsroot/canyamo/canyamo-apps/portal/presentation/rss.html,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** rss.html 8 Oct 2003 12:25:57 -0000 1.6 --- rss.html 11 Nov 2004 23:38:40 -0000 1.7 *************** *** 1,5 **** <h2 id="rss">${channel.title}</h2> ! <list channel.items as item> <a href="${item.link}" class="rssItem"> ${item.title}</a><br/> ! </list> --- 1,5 ---- <h2 id="rss">${channel.title}</h2> ! <#list channel.items as item> <a href="${item.link}" class="rssItem"> ${item.title}</a><br/> ! </#list> Index: stats.html =================================================================== RCS file: /cvsroot/canyamo/canyamo-apps/portal/presentation/stats.html,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** stats.html 6 Aug 2003 20:03:03 -0000 1.3 --- stats.html 11 Nov 2004 23:38:40 -0000 1.4 *************** *** 1,11 **** ! <div class="portlet"> ! <div class="portlet-title">Estadísticas</div> ! <div class="portlet-body"> ! <ul> ! <list actions as action> ! <li>${action.name}: ${action.statistic}:</li> ! </list> ! </ul> ! </div> ! </div> ! --- 1,10 ---- ! <div class="portlet"> ! <div class="portlet-title">Estadísticas</div> ! <div class="portlet-body"> ! <ul> ! <#list actions as action> ! <li>${action.name}: ${action.statistic}:</li> ! </#list> ! </ul> ! </div> ! </div> \ No newline at end of file |
|
From: Roberto S. <rs...@us...> - 2004-11-11 23:30:44
|
Update of /cvsroot/canyamo/canyamo-apps/items/presentation In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17044/presentation Modified Files: addform.html list.html news.html newsmail.html onfire.html portlet.html preview.html rss.rdf search-bytext.html search-bytype.html Log Message: # para usar freemarker 2.3 y tildes Index: newsmail.html =================================================================== RCS file: /cvsroot/canyamo/canyamo-apps/items/presentation/newsmail.html,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** newsmail.html 12 Jul 2004 10:46:20 -0000 1.4 --- newsmail.html 11 Nov 2004 23:30:33 -0000 1.5 *************** *** 80,84 **** </div> </h1> ! <list items as item> <table width="100%"><tbody> <tr class="cabecera"> --- 80,84 ---- </div> </h1> ! <#list items as item> <table width="100%"><tbody> <tr class="cabecera"> *************** *** 109,113 **** </tbody></table> <br> ! </list> <br> --- 109,113 ---- </tbody></table> <br> ! </#list> <br> *************** *** 116,120 **** Este mail te llega gracias a nuestro patrocinador <b>NHT-Norwick</b>. <br> ! Consultoría especializada en TI y e-Business. <br> <a href="http://www.nht-norwick.com">http://www.nht-norwick.com</a> --- 116,120 ---- Este mail te llega gracias a nuestro patrocinador <b>NHT-Norwick</b>. <br> ! Consultoría especializada en TI y e-Business. <br> <a href="http://www.nht-norwick.com">http://www.nht-norwick.com</a> Index: rss.rdf =================================================================== RCS file: /cvsroot/canyamo/canyamo-apps/items/presentation/rss.rdf,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** rss.rdf 6 Aug 2003 20:02:15 -0000 1.2 --- rss.rdf 11 Nov 2004 23:30:33 -0000 1.3 *************** *** 1,15 **** ! <?xml version='1.0' encoding='iso-8859-1' ?> ! <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://my.netscape.com/rdf/simple/0.9/"> ! <channel> ! <title>javaHispano</title> ! <description>Solo Java. Solo en castellano</description> ! <link>http://www.javahispano.org</link> ! <language>es</language> ! </channel> ! <list items as item> ! <item> ! <title>${item.title}</title> ! <link>http://www.javahispano.org/news.item.action?id=${item.id}</link> ! </item> ! </list> ! </rdf:RDF> --- 1,29 ---- ! <?xml version='1.0' encoding='iso-8859-1' ?> ! ! <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://my.netscape.com/rdf/simple/0.9/"> ! ! <channel> ! ! <title>javaHispano</title> ! ! <description>Solo Java. Solo en castellano</description> ! ! <link>http://www.javahispano.org</link> ! ! <language>es</language> ! ! </channel> ! ! <#list items as item> ! ! <item> ! ! <title>${item.title}</title> ! ! <link>http://www.javahispano.org/news.item.action?id=${item.id}</link> ! ! </item> ! ! </#list> ! ! </rdf:RDF> \ No newline at end of file Index: search-bytype.html =================================================================== RCS file: /cvsroot/canyamo/canyamo-apps/items/presentation/search-bytype.html,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** search-bytype.html 24 Sep 2004 13:03:21 -0000 1.8 --- search-bytype.html 11 Nov 2004 23:30:33 -0000 1.9 *************** *** 11,20 **** <label for="type">Tipo</label> <select class="textfield" name="type" id="type"> ! <list types as type> <option value="${type.id}">${type.text}</option> ! <list type.children as child> <option value="${child.id}"> ${child.text}</option> ! </list> ! </list> </select> --- 11,20 ---- <label for="type">Tipo</label> <select class="textfield" name="type" id="type"> ! <#list types as type> <option value="${type.id}">${type.text}</option> ! <#list type.children as child> <option value="${child.id}"> ${child.text}</option> ! </#list> ! </#list> </select> Index: addform.html =================================================================== RCS file: /cvsroot/canyamo/canyamo-apps/items/presentation/addform.html,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** addform.html 4 Nov 2004 17:39:54 -0000 1.18 --- addform.html 11 Nov 2004 23:30:33 -0000 1.19 *************** *** 53,57 **** <input class="button" name="clear" type="reset" value="Borrar"/> ! </div> ! ! </form> --- 53,56 ---- <input class="button" name="clear" type="reset" value="Borrar"/> ! </div> ! </form> \ No newline at end of file Index: portlet.html =================================================================== RCS file: /cvsroot/canyamo/canyamo-apps/items/presentation/portlet.html,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** portlet.html 30 Aug 2004 11:45:18 -0000 1.9 --- portlet.html 11 Nov 2004 23:30:33 -0000 1.10 *************** *** 3,7 **** ! <list items as item> <!-- BEGIN NOTICIA ${item.id} --> --- 3,7 ---- ! <#list items as item> <!-- BEGIN NOTICIA ${item.id} --> *************** *** 12,20 **** ${item.visits} lecturas. ! <if item.comments == 0 > <span class="comments">No hay comentarios. <a href="news.item.action?id=${item.id}">¿Quieres ser el primero?</a></span> ! <else> <span class="comments">${item.comments} comentarios. <a href="news.item.action?id=${item.id}">¿falta el tuyo?</a></span> ! </if> </div> <div class="itemBody"> --- 12,20 ---- ${item.visits} lecturas. ! <#if item.comments == 0 > <span class="comments">No hay comentarios. <a href="news.item.action?id=${item.id}">¿Quieres ser el primero?</a></span> ! <#else> <span class="comments">${item.comments} comentarios. <a href="news.item.action?id=${item.id}">¿falta el tuyo?</a></span> ! </#if> </div> <div class="itemBody"> *************** *** 26,29 **** ! </list> --- 26,29 ---- ! </#list> Index: search-bytext.html =================================================================== RCS file: /cvsroot/canyamo/canyamo-apps/items/presentation/search-bytext.html,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** search-bytext.html 30 Aug 2004 11:46:42 -0000 1.8 --- search-bytext.html 11 Nov 2004 23:30:33 -0000 1.9 *************** *** 13,19 **** <label for="field_body">Cuerpo</label> <input class="textfield" size="30" type="text" name="field_body"/> ! <p> ! La búsqueda soporta palabras sueltas y literales delimitados por comillas ! dobles: "</p> <input class="button" type="submit" name="search" value="Buscar"/> --- 13,17 ---- <label for="field_body">Cuerpo</label> <input class="textfield" size="30" type="text" name="field_body"/> ! <p>La búsqueda soporta palabras sueltas y literales delimitados por comillas dobles: "</p> <input class="button" type="submit" name="search" value="Buscar"/> Index: news.html =================================================================== RCS file: /cvsroot/canyamo/canyamo-apps/items/presentation/news.html,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** news.html 24 Sep 2004 13:03:21 -0000 1.11 --- news.html 11 Nov 2004 23:30:33 -0000 1.12 *************** *** 1,5 **** <!-- news body --> - - <a href="news.bytype.action">Buscar por tipo</a> | <a href="news.searchform.action">Buscar texto</a> | --- 1,3 ---- *************** *** 8,46 **** <!-- BEGIN NOTICIA ${item.id} --> ! <a href="news.item.action?id=${item.id}"><h2 class="${item.type}">${item.title}</h2></a> ! <div class="itemMetaData"> ! Publicada por <a href="user.profile.action?user=${item.author}">${item.author}</a> el ${item.date?string("EEEE dd MMMM yyyy hh:mm")}<br/> ! <span class="help" title="Universal Resource Locator">URL</span> de la noticia: <a href="${item.url}">${item.url}</a> ! <br/>${item.visits} lecturas. ! </div> ! <div class="itemBody"> ! <p> ! ${item.body} ! </p> ! <if editable=="true"> ! <div class="adminOptions"> ! <a class="admin" href="news.edit.action?id=${item.id}">Editar</a> | ! ! <a class="admin" href="news.remove.action?id=${item.id}">Eliminar</a> ! </div> ! </if> ! </div> ! <!-- END NOTICIA ${item.id} --> ! ! <if item.approved=="n"> ! <p><strong>Nota Importante:</strong> Este elemento no se mostrará hasta que un administrador lo ! apruebe.</p> ! </if> <h3>Comentarios</h3> <#assign i=1/> ! <list item.commentsList as comment> ! <#if ( i % 2 ) == 0 > ! <div class="comentarioPar"> ! <#else/> ! <div class="comentarioImpar"> ! </#if> <p class="commentBody">${comment.comment}</p> <div class="commentMetaData"> --- 6,40 ---- <!-- BEGIN NOTICIA ${item.id} --> ! <a href="news.item.action?id=${item.id}"><h2 class="${item.type}">${item.title}</h2></a> ! <div class="itemMetaData"> ! Publicada por <a href="user.profile.action?user=${item.author}">${item.author}</a> el ${item.date?string("EEEE dd MMMM yyyy hh:mm")}<br/> ! <span class="help" title="Universal Resource Locator">URL</span> de la noticia: <a href="${item.url}">${item.url}</a> ! <br/>${item.visits} lecturas. ! </div> ! <div class="itemBody"> ! <p>${item.body}</p> ! <#if editable==true> ! <div class="adminOptions"> ! <a class="admin" href="news.edit.action?id=${item.id}">Editar</a> | ! <a class="admin" href="news.remove.action?id=${item.id}">Eliminar</a> ! </div> ! </#if> ! </div> ! <!-- END NOTICIA ${item.id} --> ! ! <#if item.approved=="n"> ! <p><strong>Nota Importante:</strong> Este elemento no se mostrará hasta que un administrador lo apruebe.</p> ! </#if> <h3>Comentarios</h3> <#assign i=1/> ! <#list item.commentsList as comment> ! <#if ( i % 2 ) == 0 > ! <div class="comentarioPar"> ! <#else/> ! <div class="comentarioImpar"> ! </#if> <p class="commentBody">${comment.comment}</p> <div class="commentMetaData"> *************** *** 52,72 **** </div> <#assign i=i+1/> ! </list> <h3>Comenta</h3> ! <form id="formarea" method="post" ACTION="comments.comment.action"> <input type="hidden" name="id" value="${item.id}"/> <input type="hidden" name="type" value="news"/> <textarea class="textfield" name="comment" class="entradatexto" rows="8" cols="40" wrap="physical"></textarea> ! <p> ! Acepta las etiquetas B, I, U, OL, UL, LI, A y BR. Interpreta los saltos de línea como BR. ! </p> <div class="botonera"> ! <input class="button" type="submit" value="Vista previa" name="BotonEnviar"> ! ! <input class="button" type="reset" value="Borrar" name="BotonLimpiar"> </div> - </form> \ No newline at end of file --- 46,63 ---- </div> <#assign i=i+1/> ! </#list> <h3>Comenta</h3> ! <form id="formarea" method="post" action="comments.comment.action"> <input type="hidden" name="id" value="${item.id}"/> <input type="hidden" name="type" value="news"/> <textarea class="textfield" name="comment" class="entradatexto" rows="8" cols="40" wrap="physical"></textarea> ! <p>Acepta las etiquetas B, I, U, OL, UL, LI, A y BR. Interpreta los saltos de línea como BR.</p> <div class="botonera"> ! <input class="button" type="submit" value="Vista previa" name="BotonEnviar"> ! ! <input class="button" type="reset" value="Borrar" name="BotonLimpiar"> </div> </form> \ No newline at end of file Index: list.html =================================================================== RCS file: /cvsroot/canyamo/canyamo-apps/items/presentation/list.html,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** list.html 30 Aug 2004 11:45:18 -0000 1.13 --- list.html 11 Nov 2004 23:30:33 -0000 1.14 *************** *** 1,28 **** <h1>Historial de Noticias</h1> ! <a href="news.bytype.action">Buscar por tipo</a> | ! <a href="news.searchform.action">Buscar texto</a> | ! <a href="news.addform.action">Publicar noticia</a> | ! <a href="noticias.rdf">RSS de las noticias</a> ! <list items as item> ! <!-- BEGIN NOTICIA ${item.id} --> ! <a href="news.item.action?id=${item.id}" title="Enlace permanente"><h2 class="${item.type}">${item.title}</h2></a> ! <div class="itemMetaData"> ! Publicada por <a href="user.profile.action?user=${item.author}">${item.author}</a> el ${item.date?string("EEEE dd MMMM yyyy hh:mm")}<br/> ! ${item.visits} lecturas. ! ! <if item.comments == 0 > ! No hay comentarios. <a href="news.item.action?id=${item.id}">¿Quieres ser el primero?</a> ! <else> ! ${item.comments} comentarios. <a href="news.item.action?id=${item.id}">¿falta el tuyo?</a> ! </if> ! </div> ! <div class="itemBody"> ! <p> <transform cutText; size=300>${item.body}</transform> ! </p> ! </div> ! <!-- END NOTICIA ${item.id} --> ! </list> --- 1,27 ---- <h1>Historial de Noticias</h1> ! <a href="news.bytype.action">Buscar por tipo</a> | ! <a href="news.searchform.action">Buscar texto</a> | ! <a href="news.addform.action">Publicar noticia</a> | ! <a href="noticias.rdf">RSS de las noticias</a> ! <#list items as item> ! <!-- BEGIN NOTICIA ${item.id} --> ! <a href="news.item.action?id=${item.id}" title="Enlace permanente"><h2 class="${item.type}">${item.title}</h2></a> ! <div class="itemMetaData"> ! Publicada por <a href="user.profile.action?user=${item.author}">${item.author}</a> el ${item.date?string("EEEE dd MMMM yyyy hh:mm")}<br/> ! ${item.visits} lecturas. ! <#if item.comments == 0 > ! No hay comentarios. <a href="news.item.action?id=${item.id}">¿Quieres ser el primero?</a> ! <#else> ! ${item.comments} comentarios. <a href="news.item.action?id=${item.id}">¿falta el tuyo?</a> ! </#if> ! </div> ! <div class="itemBody"> ! <p> <transform cutText; size=300>${item.body}</transform> ! </p> ! </div> ! <!-- END NOTICIA ${item.id} --> ! </#list> \ No newline at end of file Index: preview.html =================================================================== RCS file: /cvsroot/canyamo/canyamo-apps/items/presentation/preview.html,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** preview.html 24 Sep 2004 13:03:21 -0000 1.8 --- preview.html 11 Nov 2004 23:30:33 -0000 1.9 *************** *** 4,43 **** <h3>Noticia completa</h3> <table width="100%"> ! <tbody> ! <tr class="cabecera"> ! <td colspan="2" class="cabecera"> ! <b>${item.title}</b> ! </td> ! </tr> ! <tr class="cabecera"> ! <td class="cabecera"> ! ${item.author} ! </td> ! <td width="90" class="cabecera" align="center"> ! ${item.date?string("yyyy-MM-dd hh:mm:ss")} ! </td> ! </tr> ! <tr> ! <td> ! ${item.body} ! </td> ! <td width="105" align="center"> ! <img width="73" height="73" src="imagenes/news/${item.type}.gif" /> ! </td> ! </tr> ! <tr> ! <td> ! ! </td> ! <td align="center"> ! Comentarios: 0 ! </td> ! </tr> ! <tr class="cabecera"> ! <td colspan="2" class="cabecera"> ! <a href='${item.url}'>${item.url}</a> ! </td> ! </tr> ! </tbody> </table> --- 4,43 ---- <h3>Noticia completa</h3> <table width="100%"> ! <tbody> ! <tr class="cabecera"> ! <td colspan="2" class="cabecera"> ! <b>${item.title}</b> ! </td> ! </tr> ! <tr class="cabecera"> ! <td class="cabecera"> ! ${item.author} ! </td> ! <td width="90" class="cabecera" align="center"> ! ${item.date?string("yyyy-MM-dd hh:mm:ss")} ! </td> ! </tr> ! <tr> ! <td> ! ${item.body} ! </td> ! <td width="105" align="center"> ! <img width="73" height="73" src="imagenes/news/${item.type}.gif" /> ! </td> ! </tr> ! <tr> ! <td> ! ! </td> ! <td align="center"> ! Comentarios: 0 ! </td> ! </tr> ! <tr class="cabecera"> ! <td colspan="2" class="cabecera"> ! <a href='${item.url}'>${item.url}</a> ! </td> ! </tr> ! </tbody> </table> *************** *** 92,107 **** <td> <select name="type" class="textfield"> ! <list types as type> <option value="${type.id}" ! <if item.type == type.id>SELECTED</if> /> ${type.text} </option> ! </list> </select> </td> </tr> <tr> ! <td>Titulo</td> <td> <input class="textfield" maxlength="50" --- 92,107 ---- <td> <select name="type" class="textfield"> ! <#list types as type> <option value="${type.id}" ! <#if item.type == type.id>SELECTED</#if> /> ${type.text} </option> ! </#list> </select> </td> </tr> <tr> ! <td>Título</td> <td> <input class="textfield" maxlength="50" *************** *** 133,140 **** <input class="button" name="save" type="submit" value="Publicar" /> ! </td> ! </tr> ! </table> ! </form> </div> ! <!-- end news body --> --- 133,140 ---- <input class="button" name="save" type="submit" value="Publicar" /> ! </td> ! </tr> ! </table> ! </form> </div> ! <!-- end news body --> \ No newline at end of file Index: onfire.html =================================================================== RCS file: /cvsroot/canyamo/canyamo-apps/items/presentation/onfire.html,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** onfire.html 30 Aug 2004 11:45:18 -0000 1.3 --- onfire.html 11 Nov 2004 23:30:33 -0000 1.4 *************** *** 1,6 **** <h3>Actualidad</h3> <ul> ! <list items as item> <li><a href="news.item.action?id=${item.id}" title="Enlace permanente">${item.title}.</a></li> ! </list> </ul> --- 1,6 ---- <h3>Actualidad</h3> <ul> ! <#list items as item> <li><a href="news.item.action?id=${item.id}" title="Enlace permanente">${item.title}.</a></li> ! </#list> </ul> |
|
From: Roberto S. <rs...@us...> - 2004-11-11 23:30:42
|
Update of /cvsroot/canyamo/canyamo-apps/items/presentation/admin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17044/presentation/admin Modified Files: edit.html notapprovedlist.html Log Message: # para usar freemarker 2.3 y tildes Index: edit.html =================================================================== RCS file: /cvsroot/canyamo/canyamo-apps/items/presentation/admin/edit.html,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** edit.html 23 Jul 2004 08:57:08 -0000 1.11 --- edit.html 11 Nov 2004 23:30:33 -0000 1.12 *************** *** 1 **** ! <!-- news body --> <h1>Editar noticia</h1> <form id="formarea" action="news.save.action" method="post"> <input type="hidden" name="id" value="${item.id}"/> <label for="title">Título</label> <input class="textfield" maxlength="50" id="title" name="title" size="50" type="text" value="${item.title}" /> <label for="type">Tipo</label> <input class="textfield" id="type" maxlength="10" name="type" size="50" type="text" value="${item.type}" /> <label for="date">Fecha (la modificación de este campo no produce ningún efecto)</label> <input class="textfield" id="type" maxlength="11" id="date" editable="false" size="50" type="text" value="${item.date}" /> <label for="url">URL</label> <input class="textfield" id="url" maxlength="80" name="url" size="50" type="text" value="${item.url}"/> <label for="Body">Cuerpo</label> <textarea class="textfield" id="Body" name="body" rows="12" cols="50" wrap="physical">${item.body}</textarea> <input class="button" name="add" type="submit" value="Guardar"/> <input class="button" name="clear" type="reset" value="Borrar"/> </form> \ No newline at end of file --- 1,25 ---- ! <!-- news body --> ! <h1>Editar noticia</h1> ! ! <form id="formarea" action="news.save.action" method="post"> ! <input type="hidden" name="id" value="${item.id}"/> ! ! <label for="title">Título</label> ! <input class="textfield" maxlength="50" id="title" name="title" size="50" type="text" value="${item.title}" /> ! ! <label for="type">Tipo</label> ! <input class="textfield" id="type" maxlength="10" name="type" size="50" type="text" value="${item.type}" /> ! ! <label for="date">Fecha (la modificación de este campo no produce ningún efecto)</label> ! <input class="textfield" id="type" maxlength="11" id="date" editable="false" size="50" type="text" value="${item.date}" /> ! ! <label for="url">URL</label> ! <input class="textfield" id="url" maxlength="80" name="url" size="50" type="text" value="${item.url}"/> ! ! <label for="Body">Cuerpo</label> ! <textarea class="textfield" id="Body" name="body" rows="12" cols="50" wrap="physical">${item.body}</textarea> ! ! <input class="button" name="add" type="submit" value="Guardar"/> ! ! <input class="button" name="clear" type="reset" value="Borrar"/> ! </form> \ No newline at end of file Index: notapprovedlist.html =================================================================== RCS file: /cvsroot/canyamo/canyamo-apps/items/presentation/admin/notapprovedlist.html,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** notapprovedlist.html 29 Sep 2004 10:58:14 -0000 1.12 --- notapprovedlist.html 11 Nov 2004 23:30:33 -0000 1.13 *************** *** 1,4 **** <h1>Noticias no aprobadas</h1> ! <list items as item> <!-- BEGIN NOTICIA ${item.id}--> <h2><a href="news.item.action?id=${item.id}">${item.title}</a></h2> --- 1,4 ---- <h1>Noticias no aprobadas</h1> ! <#list items as item> <!-- BEGIN NOTICIA ${item.id}--> <h2><a href="news.item.action?id=${item.id}">${item.title}</a></h2> *************** *** 17,25 **** <p> <a href="news.vote.action?id=${item.id}"> ! Votar la aprobación de esta noticia </a> -- <a href="news.unvote.action?id=${item.id}"> ! Votar la eliminación de esta noticia </a> <br/> --- 17,25 ---- <p> <a href="news.vote.action?id=${item.id}"> ! Votar la aprobación de esta noticia </a> -- <a href="news.unvote.action?id=${item.id}"> ! Votar la eliminación de esta noticia </a> <br/> *************** *** 27,29 **** </p> <!-- END NOTICIA ${item.id}--> ! </list> \ No newline at end of file --- 27,29 ---- </p> <!-- END NOTICIA ${item.id}--> ! </#list> \ No newline at end of file |
|
From: Roberto S. <rs...@us...> - 2004-11-11 23:00:48
|
Update of /cvsroot/canyamo/canyamo-apps/commons/presentation In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9198 Modified Files: exception.html Log Message: tilde Index: exception.html =================================================================== RCS file: /cvsroot/canyamo/canyamo-apps/commons/presentation/exception.html,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** exception.html 26 Sep 2004 11:21:43 -0000 1.5 --- exception.html 11 Nov 2004 23:00:29 -0000 1.6 *************** *** 1,2 **** ! <h1>Excepción del programa</h1> <p>${message}</p> \ No newline at end of file --- 1,2 ---- ! <h1>Excepción del programa</h1> <p>${message}</p> \ No newline at end of file |
|
From: Roberto S. <rs...@us...> - 2004-11-11 22:37:36
|
Update of /cvsroot/canyamo/canyamo-apps/download/src/org/javahispano/web/apps/download In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2905/src/org/javahispano/web/apps/download Modified Files: CommandAction.java DirListAction.java DownloadFileAction.java UploadFileAction.java Log Message: ya funciona la aplicación segun la bajas Index: DirListAction.java =================================================================== RCS file: /cvsroot/canyamo/canyamo-apps/download/src/org/javahispano/web/apps/download/DirListAction.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** DirListAction.java 29 Jul 2004 10:58:29 -0000 1.3 --- DirListAction.java 11 Nov 2004 22:37:26 -0000 1.4 *************** *** 64,68 **** List dbFiles = dbm.select(dbc); ! debug("[DirListAction] files found: " + dbFiles.size()); for (int i = 0; i < dbFiles.size(); i++) { DbObject file = (DbObject) dbFiles.get(i); --- 64,68 ---- List dbFiles = dbm.select(dbc); ! logger.debug("[DirListAction] files found: " + dbFiles.size()); for (int i = 0; i < dbFiles.size(); i++) { DbObject file = (DbObject) dbFiles.get(i); *************** *** 77,81 **** } ! debug("[DirListAction] files.size: " + files.size() + " dirs.size:"+ dirs.size()); data.setAttribute("parent", (dir!=null)?dir.get("parent"):"0"); --- 77,81 ---- } ! logger.debug("[DirListAction] files.size: " + files.size() + " dirs.size:"+ dirs.size()); data.setAttribute("parent", (dir!=null)?dir.get("parent"):"0"); *************** *** 83,90 **** data.setAttribute("files", files); data.setAttribute("dirs", dirs); ! data.setAttribute("editable", String.valueOf(data.getUser().isInRole(adminRole))); data.setAttribute("id", id); } catch (Exception e) { ! error("[DirListAction] exception: " + e.getMessage()); throw new CanyamoException("[DirListAction] Cannot open dir: " + e.getMessage()); --- 83,90 ---- data.setAttribute("files", files); data.setAttribute("dirs", dirs); ! data.setAttribute("editable", Boolean.valueOf(data.getUser().isInRole(adminRole))); data.setAttribute("id", id); } catch (Exception e) { ! logger.error("[DirListAction] exception: " + e.getMessage()); throw new CanyamoException("[DirListAction] Cannot open dir: " + e.getMessage()); Index: DownloadFileAction.java =================================================================== RCS file: /cvsroot/canyamo/canyamo-apps/download/src/org/javahispano/web/apps/download/DownloadFileAction.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** DownloadFileAction.java 3 Aug 2004 16:55:18 -0000 1.2 --- DownloadFileAction.java 11 Nov 2004 22:37:26 -0000 1.3 *************** *** 44,48 **** String fileId = data.getParameter("id"); ! debug("[DownloadFileAction] id: " + fileId); DbObject file = DbManager.getInstance().loadDbObject(type, fileId); --- 44,48 ---- String fileId = data.getParameter("id"); ! logger.debug("[DownloadFileAction] id: " + fileId); DbObject file = DbManager.getInstance().loadDbObject(type, fileId); *************** *** 51,55 **** String path = root_path + File.separator + file.get("path"); ! debug("[DownloadFileAction] path: " + path); Integer c = (Integer) file.get("count"); --- 51,55 ---- String path = root_path + File.separator + file.get("path"); ! logger.debug("[DownloadFileAction] path: " + path); Integer c = (Integer) file.get("count"); *************** *** 69,73 **** data.setContentType(mimetype); ! debug("[DownloadFileAction] mime-type: " + mimetype); InputStream in = fds.getInputStream(); --- 69,73 ---- data.setContentType(mimetype); ! logger.debug("[DownloadFileAction] mime-type: " + mimetype); InputStream in = fds.getInputStream(); *************** *** 86,90 **** } } catch (Exception e) { ! error("[DownloadFileAction] : " + e.getMessage()); throw new CanyamoException("[DownloadFileAction] Cannot download file: " + e.getMessage()); --- 86,90 ---- } } catch (Exception e) { ! logger.error("[DownloadFileAction] : " + e.getMessage()); throw new CanyamoException("[DownloadFileAction] Cannot download file: " + e.getMessage()); Index: UploadFileAction.java =================================================================== RCS file: /cvsroot/canyamo/canyamo-apps/download/src/org/javahispano/web/apps/download/UploadFileAction.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** UploadFileAction.java 14 Jul 2004 10:02:42 -0000 1.2 --- UploadFileAction.java 11 Nov 2004 22:37:26 -0000 1.3 *************** *** 84,98 **** dbo.set("isdir", "N"); ! debug("[UploadFileAction] upload:" + dbo); dbm.saveDbObject(dbo); } data.forward("download.dirlist.action?id=" + parent); } catch (Exception e) { ! error("[UploadFileAction.process] Exception: " + e.getMessage()); throw new CanyamoException("[UploadFileAction.process] Exception: " + e.getMessage()); } } else { ! log("[UploadFileAction] Trato de ser admin: " + data.getUser().getLogin()); throw new CanyamoError("No tienes los derechos necesarios para esta funcion"); } --- 84,98 ---- dbo.set("isdir", "N"); ! logger.debug("[UploadFileAction] upload:" + dbo); dbm.saveDbObject(dbo); } data.forward("download.dirlist.action?id=" + parent); } catch (Exception e) { ! logger.error("[UploadFileAction.process] Exception: " + e.getMessage()); throw new CanyamoException("[UploadFileAction.process] Exception: " + e.getMessage()); } } else { ! logger.info("[UploadFileAction] Trato de ser admin: " + data.getUser().getLogin()); throw new CanyamoError("No tienes los derechos necesarios para esta funcion"); } Index: CommandAction.java =================================================================== RCS file: /cvsroot/canyamo/canyamo-apps/download/src/org/javahispano/web/apps/download/CommandAction.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** CommandAction.java 14 Jul 2004 10:08:54 -0000 1.2 --- CommandAction.java 11 Nov 2004 22:37:26 -0000 1.3 *************** *** 56,60 **** boolean error = false; ! debug("[CommandAction] cmd:" + cmd); if ("mkdir".equals(cmd)) { --- 56,60 ---- boolean error = false; ! logger.debug("[CommandAction] cmd:" + cmd); if ("mkdir".equals(cmd)) { *************** *** 66,75 **** data.forward("download.dirlist.action?deleteerror=" + error + "&id=" + this.parent); } catch (Exception e) { ! error("[CommandAction] : " + e.getMessage()); throw new CanyamoException("[CommandAction] : " + e.getMessage()); } } else { ! log("[CommandAction] Trato de ser admin: " + data.getUser().getLogin()); throw new CanyamoError("No tienes los derechos necesarios para esta funcion"); } --- 66,75 ---- data.forward("download.dirlist.action?deleteerror=" + error + "&id=" + this.parent); } catch (Exception e) { ! logger.error("[CommandAction] : " + e.getMessage()); throw new CanyamoException("[CommandAction] : " + e.getMessage()); } } else { ! logger.info("[CommandAction] Trato de ser admin: " + data.getUser().getLogin()); throw new CanyamoError("No tienes los derechos necesarios para esta funcion"); } *************** *** 84,88 **** this.parent = (Integer) dbo.get("parent"); ! debug("[CommandAction] rm " + root_path + dbo.get("path")); File f = new File(root_path + dbo.get("path")); --- 84,88 ---- this.parent = (Integer) dbo.get("parent"); ! logger.debug("[CommandAction] rm " + root_path + dbo.get("path")); File f = new File(root_path + dbo.get("path")); *************** *** 102,106 **** String path = ""; ! debug("[CommandAction.mkdir] parent:" + parent + " rol:" + rol + " name:" + name); DbManager dbm = DbManager.getInstance(); --- 102,106 ---- String path = ""; ! logger.debug("[CommandAction.mkdir] parent:" + parent + " rol:" + rol + " name:" + name); DbManager dbm = DbManager.getInstance(); *************** *** 122,126 **** dbo.set("isdir", "Y"); ! debug("[CommandAction.mkdir] mkdir " + dbo); new File(root_path + path + File.separator + name).mkdirs(); dbm.saveDbObject(dbo); --- 122,126 ---- dbo.set("isdir", "Y"); ! logger.debug("[CommandAction.mkdir] mkdir " + dbo); new File(root_path + path + File.separator + name).mkdirs(); dbm.saveDbObject(dbo); |
|
From: Roberto S. <rs...@us...> - 2004-11-11 22:37:35
|
Update of /cvsroot/canyamo/canyamo-apps/download/presentation In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2905/presentation Modified Files: dirlist.html Log Message: ya funciona la aplicación segun la bajas Index: dirlist.html =================================================================== RCS file: /cvsroot/canyamo/canyamo-apps/download/presentation/dirlist.html,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** dirlist.html 1 Aug 2004 15:36:44 -0000 1.4 --- dirlist.html 11 Nov 2004 22:37:25 -0000 1.5 *************** *** 1,139 **** <div id="sec_ficheros"> ! ! <div class="pag_portada"> ! ! <h1><span>DOCUMENTOS</span></h1> ! <div class="ficheros"> ! <#if deleteerror?exists && deleteerror=="true"> ! <div class="msg_error"> ! <h2>SÓLO PUEDE ELIMINAR LOS DIRECTORIO QUE ESTÉN VACÍOS.</h2> ! </div> </#if> ! <div class="ruta"><strong>Ruta:</strong> "${path?if_exists}"</div> ! <table cellspacing="1" summary="Listado de carpetas y fichero de la ruta actual"> ! <tr class="cabecera"> ! <th class="nombre">Nombre</th> ! <th class="tamano">Tamaño</th> ! <#if editable=="true"> ! <th class="eliminar"> </th> ! </#if> ! </tr> ! <tr> ! <td class="nombre"><span><a class="carpeta_subir" href="download.dirlist.action?id=${parent}">.. (Subir directorio)</a></span></td> ! <td class="tamano"><span> </span></td> ! <#if editable=="true"> ! <td class="eliminar"> </td> </#if> ! </tr> ! ! <#list dirs as dir> ! <tr> ! <td class="nombre"><span><a class="carpeta" href="download.dirlist.action?id=${dir.id}">${dir.name}</a></span></td> ! <td class="tamano"><span> </span></td> ! <#if editable=="true"> ! <td class="eliminar"><a href="download.command.action?id=${dir.id}&cmd=rm" title="Eliminar"><span>Eliminar</span></a></td> ! </#if> ! </tr> </#list> - <#list files as file> ! <tr> ! <td class="nombre"><span><a class="fichero" href="download.download.action?id=${file.id}" title="${file.description?if_exists}">${file.title}</a></span></td> ! <td class="tamano"><span>${file.size} bytes</span></td> ! <#if editable=="true"> ! <td class="eliminar"><a href="download.command.action?id=${file.id}&cmd=rm" title="Eliminar"><span>Eliminar</span></a></td> ! </#if> ! </tr> </#list> ! </table> ! ! <#if editable=="true"> ! <div class="opciones"> ! <div class="carpeta"> ! <form action="download.command.action" method="post"> ! <input type="hidden" name="parent" value="${id?if_exists}" /> ! <input type="hidden" name="cmd" value="mkdir" /> ! <h3>Crear carpeta</h3> ! <div class="campo"> ! <div>Acceso:</div> ! <select name="rol"> ! <option value="user">Solo yo</option> ! <option value="editor">Editor</option> ! <option value="admin">Administrador</option> ! <option value="public">Público</option> ! </select> ! </div> ! ! <div class="campo"> ! <div>Nombre:</div> ! <input type="text" name="name" size="30" /> ! </div> ! ! <div class="botones"> ! <input class="boton1" size="30" type="submit" name="newFolder" value="Crear carpeta" /> ! </div> ! </form> ! </div> <!-- carpeta --> ! ! ! <div class="fichero"> ! <form action="download.uploadfile.action" method="post" enctype="multipart/form-data"> ! <input type="hidden" name="path" value="${path?if_exists}" /> ! <input type="hidden" name="parent" value="${id?if_exists}" /> ! <h3>Subir fichero al directorio actual</h3> ! <div class="campo"> ! <div>Acceso:</div> ! <select name="rol"> ! <option value="user">Solo yo</option> ! <option value="editor">Editor</option> ! <option value="admin">Administrador</option> ! <option value="public">Público</option> ! </select> ! </div> ! ! <div class="campo"> ! <div>Título:</div> ! <input type="text" name="title" size="30" /> ! </div> ! ! <div class="campo"> ! <div>Descripción:</div> ! <textarea name="description" rows="3" cols="30"></textarea> ! </div> ! ! <div class="campo"> ! <div>Fichero:</div> ! <input type="file" name="file" size="30" /> ! </div> ! ! <div class="botones"> ! <input class="boton1" type="submit" name="new" value="Subir fichero" /> ! ! </div> ! </form> ! </div> <!-- fichero --> ! <div class="fake"></div> ! </div> <!-- opciones --> ! </#if> ! <div class="fake"></div> ! </div> <!-- ficheros --> <div class="fake"></div> ! </div> <!-- pag_portada --> ! ! </div> <!-- sec_ficheros --> --- 1,121 ---- <div id="sec_ficheros"> ! <div class="pag_portada"> ! <h1><span>DOCUMENTOS</span></h1> ! <div class="ficheros"> <#if deleteerror?exists && deleteerror=="true"> ! <div class="msg_error"> ! <h2>SÓLO PUEDE ELIMINAR LOS DIRECTORIO QUE ESTÉN VACÍOS.</h2> ! </div> </#if> ! <div class="ruta"><strong>Ruta:</strong> "${path?if_exists}"</div> ! <table cellspacing="1" summary="Listado de carpetas y fichero de la ruta actual"> ! <tr class="cabecera"> ! <th class="nombre">Nombre</th> ! <th class="tamano">Tamaño</th> ! <#if editable==true> ! <th class="eliminar"> </th> ! </#if> </tr> ! <tr> ! <td class="nombre"><span><a class="carpeta_subir" href="download.dirlist.action?id=${parent}">.. (Subir directorio)</a></span></td> ! <td class="tamano"><span> </span></td> ! <#if editable==true> ! <td class="eliminar"> </td> </#if> ! </tr> <#list dirs as dir> ! <tr> ! <td class="nombre"><span><a class="carpeta" href="download.dirlist.action?id=${dir.id}">${dir.name}</a></span></td> ! <td class="tamano"><span> </span></td> ! <#if editable==true> ! <td class="eliminar"><a href="download.command.action?id=${dir.id}&cmd=rm" title="Eliminar"><span>Eliminar</span></a></td> ! </#if> ! </tr> </#list> <#list files as file> ! <tr> ! <td class="nombre"><span><a class="fichero" href="download.download.action?id=${file.id}" title="${file.description?if_exists}">${file.title}</a></span></td> ! <td class="tamano"><span>${file.size} bytes</span></td> ! <#if editable==true> ! <td class="eliminar"><a href="download.command.action?id=${file.id}&cmd=rm" title="Eliminar"><span>Eliminar</span></a></td> ! </#if> ! </tr> </#list> + </table> + <#if editable==true> + <div class="opciones"> + <div class="carpeta"> + <form action="download.command.action" method="post"> + <input type="hidden" name="parent" value="${id?if_exists}" /> + <input type="hidden" name="cmd" value="mkdir" /> + <h3>Crear carpeta</h3> + <div class="campo"> + <div>Acceso:</div> + <select name="rol"> + <option value="user">Solo yo</option> + <option value="editor">Editor</option> + <option value="admin">Administrador</option> + <option value="public">Público</option> + </select> + </div> ! <div class="campo"> ! <div>Nombre:</div> ! <input type="text" name="name" size="30" /> ! </div> + <div class="botones"> + <input class="boton1" size="30" type="submit" name="newFolder" value="Crear carpeta" /> + </div> + </form> + </div> <!-- carpeta --> ! <div class="fichero"> ! <form action="download.uploadfile.action" method="post" enctype="multipart/form-data"> ! <input type="hidden" name="path" value="${path?if_exists}" /> ! <input type="hidden" name="parent" value="${id?if_exists}" /> ! <h3>Subir fichero al directorio actual</h3> ! <div class="campo"> ! <div>Acceso:</div> ! <select name="rol"> ! <option value="user">Solo yo</option> ! <option value="editor">Editor</option> ! <option value="admin">Administrador</option> ! <option value="public">Público</option> ! </select> ! </div> + <div class="campo"> + <div>Título:</div> + <input type="text" name="title" size="30" /> + </div> ! <div class="campo"> ! <div>Descripción:</div> ! <textarea name="description" rows="3" cols="30"></textarea> ! </div> + <div class="campo"> + <div>Fichero:</div> + <input type="file" name="file" size="30" /> + </div> + <div class="botones"> + <input class="boton1" type="submit" name="new" value="Subir fichero" /> + </div> + </form> + </div> <!-- fichero --> <div class="fake"></div> + </div> <!-- opciones --> + </#if> ! <div class="fake"></div> ! </div> <!-- ficheros --> ! <div class="fake"></div> ! </div> <!-- pag_portada --> ! </div> <!-- sec_ficheros --> \ No newline at end of file |
|
From: Roberto S. <rs...@us...> - 2004-11-11 22:37:35
|
Update of /cvsroot/canyamo/canyamo-apps/download/db-schema In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2905/db-schema Modified Files: download-hsqldb.sql download-mysql.sql download-pgsql.sql Log Message: ya funciona la aplicación segun la bajas Index: download-pgsql.sql =================================================================== RCS file: /cvsroot/canyamo/canyamo-apps/download/db-schema/download-pgsql.sql,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** download-pgsql.sql 16 Sep 2004 13:02:28 -0000 1.2 --- download-pgsql.sql 11 Nov 2004 22:37:25 -0000 1.3 *************** *** 3,20 **** CREATE TABLE download ( ! id integer DEFAULT nextval('"download_id_seq"'::text) NOT NULL, ! parent integer NOT NULL, "path" character varying NOT NULL, ! login character varying(12) NOT NULL, ! rol character varying NOT NULL, ! name character varying, ! size bigint, ! isdir character(1), ! title character varying, ! description character varying, ! count integer DEFAULT 0, ); ! CREATE UNIQUE INDEX download_id_key ON download USING btree (id); ! ! insert into download values(1, 0, '/download', 'javahispano', '', 'poweredby.png', 6200, 'n', 'PoweredBy Cáñamo', 'Logo para poner en las páginas hechas con Cáñamo', 0); --- 3,19 ---- CREATE TABLE download ( ! "id" SERIAL NOT NULL, ! "parent" integer NOT NULL, "path" character varying NOT NULL, ! "login" character varying(12) NOT NULL, ! "rol" character varying NOT NULL, ! "name" character varying, ! "size" bigint, ! "isdir" character(1), ! "title" character varying, ! "description" character varying, ! "count" integer DEFAULT 0, ! PRIMARY KEY (id) ); ! insert into download values(1, 0, 'poweredby.png', 'javahispano', 'public', 'poweredby.png', 6200, 'n', 'PoweredBy Cáñamo', 'Logo para poner en las páginas hechas con Cáñamo', 0); Index: download-mysql.sql =================================================================== RCS file: /cvsroot/canyamo/canyamo-apps/download/db-schema/download-mysql.sql,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** download-mysql.sql 16 Sep 2004 13:02:28 -0000 1.2 --- download-mysql.sql 11 Nov 2004 22:37:25 -0000 1.3 *************** *** 16,18 **** ! insert into download values(1, 0, '/download', 'javahispano', '', 'poweredby.png', 6200, 'n', 'PoweredBy Cáñamo', 'Logo para poner en las páginas hechas con Cáñamo', 0); --- 16,18 ---- ! insert into download values(1, 0, 'poweredby.png', 'javahispano', 'public', 'poweredby.png', 6200, 'n', 'PoweredBy Cáñamo', 'Logo para poner en las páginas hechas con Cáñamo', 0); Index: download-hsqldb.sql =================================================================== RCS file: /cvsroot/canyamo/canyamo-apps/download/db-schema/download-hsqldb.sql,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** download-hsqldb.sql 16 Sep 2004 13:02:28 -0000 1.5 --- download-hsqldb.sql 11 Nov 2004 22:37:25 -0000 1.6 *************** *** 24,26 **** CREATE INDEX download_id_key ON download(id); ! insert into download values(1, 0, '/download', 'javahispano', '', 'poweredby.png', 6200, 'n', 'PoweredBy Cáñamo', 'Logo para poner en las páginas hechas con Cáñamo', 0); --- 24,26 ---- CREATE INDEX download_id_key ON download(id); ! insert into download values(1, 0, 'poweredby.png', 'javahispano', 'public', 'poweredby.png', 6200, 'n', 'PoweredBy Cáñamo', 'Logo para poner en las páginas hechas con Cáñamo', 0); |
|
From: Roberto S. <rs...@us...> - 2004-11-11 18:30:22
|
Update of /cvsroot/canyamo/canyamo-apps/items/db-schema In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11836/items/db-schema Added Files: items-pgsql.sql Log Message: no message --- NEW FILE: items-pgsql.sql --- -- -- Table structure for table `news` -- DROP TABLE news; CREATE TABLE "news" ( "id" SERIAL NOT NULL, "type" character varying(255) NOT NULL DEFAULT 'canyamo', "date" timestamp without time zone NOT NULL, "title" character varying(50) NOT NULL default '', "body" text NOT NULL, "author" character varying(12) NOT NULL default '', "url" character varying(80) NOT NULL default '', "votes" integer DEFAULT 0, "visits" integer DEFAULT 0, "comments" integer DEFAULT 0, "lastcomment" timestamp without time zone NOT NULL, "approved" character(1) DEFAULT 'y' NOT NULL, PRIMARY KEY (id) ); -------------------------------------------------------- insert into news values(1, 'canyamo', '16-02-2003', 'Bienvenido', 'Enhorabuena, si estas viendo esto es que tu instalación de Cáñamo, en concreto de la aplicación de <i>items</i> se ha efectuado correctamente.', 'javahispano', 'canyamo.action', 11111, 0, 0, '16-02-2003', 'y'); -- -- Table structure for table `news_comments` -- DROP TABLE news_comments; CREATE TABLE news_comments ( "id" SERIAL NOT NULL, "item" integer NOT NULL default 0, "user" character varying(20) NOT NULL DEFAULT '', "comment" text NOT NULL, "date" timestamp without time zone NOT NULL default '16-02-2003', "approved" character(1) NOT NULL DEFAULT 'n', PRIMARY KEY (id) ); -------------------------------------------------------- -- -- Table structure for table `news_types` -- DROP TABLE news_types; CREATE TABLE news_types ( "id" character varying(15) NOT NULL default '', "text" character varying(25) NOT NULL default '', "parent" character varying(15) default '', PRIMARY KEY (id) ); insert into news_types values ('canyamo', 'Noticias sobre Cáñamo', 'null'); insert into news_types values ('newcanyamo', 'Nueva versión de Cáñamo', 'canyamo'); insert into news_types values ('otro', 'Otro tipo de noticias', 'null'); DROP TABLE news_votes; CREATE TABLE news_votes ( "id" SERIAL NOT NULL, "item" integer NOT NULL, "user" character varying(20) NOT NULL default '', PRIMARY KEY (id) ); |