Changeset 28493
- Timestamp:
- 01/04/08 20:51:30 (1 year ago)
- Files:
-
- org.nuxeo.ecm.core/branches/1.4/nuxeo-core-api/src/main/java/org/nuxeo/ecm/core/api/Sorter.java (modified) (2 diffs)
- org.nuxeo.ecm.platform/branches/5.1/nuxeo-platform-audit-client/src/test/java/org/nuxeo/ecm/platform/audit/web/TestRegisterAuditAction.java (modified) (2 diffs)
- org.nuxeo.ecm.platform/branches/5.1/nuxeo-platform-audit-core/src/test/java/org/nuxeo/ecm/platform/audit/TestEventConfService.java (modified) (1 diff)
- org.nuxeo.ecm.platform/branches/5.1/nuxeo-platform-audit-io/src/main/java/org/nuxeo/ecm/platform/audit/io/IOAuditAdapter.java (modified) (7 diffs)
- org.nuxeo.ecm.platform/branches/5.1/nuxeo-platform-audit-io/src/main/java/org/nuxeo/ecm/platform/audit/io/IOLogEntryBase.java (modified) (11 diffs)
- org.nuxeo.ecm.platform/branches/5.1/nuxeo-platform-audit-search/src/main/java/org/nuxeo/ecm/platform/audit/search/resources/indexing/AuditIndexableResourceImpl.java (modified) (3 diffs)
- org.nuxeo.ecm.platform/branches/5.1/nuxeo-platform-cache-server/src/test/java/org/nuxeo/ecm/platform/cache/server/TestCacheLocalReplication.java (modified) (1 diff)
- org.nuxeo.ecm.platform/branches/5.1/nuxeo-platform-comment/src/main/java/org/nuxeo/ecm/platform/comment/impl/CommentManagerImpl.java (modified) (1 diff)
- org.nuxeo.ecm.platform/branches/5.1/nuxeo-platform-comment/src/main/java/org/nuxeo/ecm/platform/comment/service/CommentService.java (modified) (1 diff)
- org.nuxeo.ecm.platform/branches/5.1/nuxeo-platform-directory-core/src/main/java/org/nuxeo/ecm/directory/AbstractDirectory.java (modified) (2 diffs)
- org.nuxeo.ecm.platform/branches/5.1/nuxeo-platform-directory-core/src/main/java/org/nuxeo/ecm/directory/InverseReference.java (modified) (1 diff)
- org.nuxeo.ecm.platform/branches/5.1/nuxeo-platform-directory-sql/src/main/java/org/nuxeo/ecm/directory/sql/repository/Table.java (modified) (3 diffs)
- org.nuxeo.ecm.platform/branches/5.1/nuxeo-platform-directory-sql/src/main/java/org/nuxeo/ecm/directory/sql/repository/Update.java (modified) (2 diffs)
- org.nuxeo.ecm.platform/branches/5.1/nuxeo-platform-filemanager-api/src/main/java/org/nuxeo/ecm/platform/filemanager/api/FileManager.java (modified) (2 diffs)
- org.nuxeo.ecm.platform/branches/5.1/nuxeo-platform-filemanager-api/src/main/java/org/nuxeo/ecm/platform/filemanager/utils/FileManagerUtils.java (modified) (2 diffs)
- org.nuxeo.ecm.platform/branches/5.1/nuxeo-platform-filemanager-core/src/main/java/org/nuxeo/ecm/platform/filemanager/service/FileManagerService.java (modified) (4 diffs)
- org.nuxeo.ecm.platform/branches/5.1/nuxeo-platform-filemanager-core/src/main/java/org/nuxeo/ecm/platform/filemanager/service/extension/FolderImporter.java (modified) (1 diff)
- org.nuxeo.ecm.platform/branches/5.1/nuxeo-platform-filemanager-core/src/main/java/org/nuxeo/ecm/platform/filemanager/utils/FileManagerUtils.java (modified) (1 diff)
- org.nuxeo.ecm.platform/branches/5.1/nuxeo-platform-forms-layout-client/src/main/java/org/nuxeo/ecm/platform/forms/layout/facelets/FaceletHandlerHelper.java (modified) (5 diffs)
- org.nuxeo.ecm.platform/branches/5.1/nuxeo-platform-forms-layout-client/src/main/java/org/nuxeo/ecm/platform/forms/layout/facelets/LayoutRowTagHandler.java (modified) (1 diff)
- org.nuxeo.ecm.platform/branches/5.1/nuxeo-platform-forms-layout-client/src/main/java/org/nuxeo/ecm/platform/forms/layout/facelets/LayoutRowWidgetTagHandler.java (modified) (1 diff)
- org.nuxeo.ecm.platform/branches/5.1/nuxeo-platform-forms-layout-client/src/main/java/org/nuxeo/ecm/platform/forms/layout/facelets/LeafFaceletHandler.java (modified) (1 diff)
- org.nuxeo.ecm.platform/branches/5.1/nuxeo-platform-forms-layout-client/src/main/java/org/nuxeo/ecm/platform/forms/layout/facelets/SubWidgetTagHandler.java (modified) (1 diff)
- org.nuxeo.ecm.platform/branches/5.1/nuxeo-platform-forms-layout-client/src/main/java/org/nuxeo/ecm/platform/forms/layout/facelets/WidgetTagHandler.java (modified) (1 diff)
- org.nuxeo.ecm.platform/branches/5.1/nuxeo-platform-forms-layout-client/src/main/java/org/nuxeo/ecm/platform/forms/layout/facelets/library/LayoutTagLibrary.java (modified) (1 diff)
- org.nuxeo.ecm.platform/branches/5.1/nuxeo-platform-forms-layout-client/src/main/java/org/nuxeo/ecm/platform/forms/layout/facelets/plugins/DateTimeWidgetTypeHandler.java (modified) (2 diffs)
- org.nuxeo.ecm.platform/branches/5.1/nuxeo-platform-forms-layout-client/src/main/java/org/nuxeo/ecm/platform/forms/layout/facelets/plugins/DirectorySelectManyWidgetTypeHandler.java (modified) (2 diffs)
- org.nuxeo.ecm.platform/branches/5.1/nuxeo-platform-forms-layout-client/src/main/java/org/nuxeo/ecm/platform/forms/layout/facelets/plugins/DirectorySelectOneWidgetTypeHandler.java (modified) (2 diffs)
- org.nuxeo.ecm.platform/branches/5.1/nuxeo-platform-forms-layout-client/src/main/java/org/nuxeo/ecm/platform/forms/layout/facelets/plugins/FileWidgetTypeHandler.java (modified) (1 diff)
- org.nuxeo.ecm.platform/branches/5.1/nuxeo-platform-forms-layout-client/src/main/java/org/nuxeo/ecm/platform/forms/layout/facelets/plugins/HtmlTextWidgetTypeHandler.java (modified) (1 diff)
- org.nuxeo.ecm.platform/branches/5.1/nuxeo-platform-forms-layout-client/src/main/java/org/nuxeo/ecm/platform/forms/layout/facelets/plugins/IntWidgetTypeHandler.java (modified) (1 diff)
- org.nuxeo.ecm.platform/branches/5.1/nuxeo-platform-forms-layout-client/src/main/java/org/nuxeo/ecm/platform/forms/layout/facelets/plugins/SecretWidgetTypeHandler.java (modified) (1 diff)
- org.nuxeo.ecm.platform/branches/5.1/nuxeo-platform-forms-layout-client/src/main/java/org/nuxeo/ecm/platform/forms/layout/facelets/plugins/TextWidgetTypeHandler.java (modified) (1 diff)
- org.nuxeo.ecm.platform/branches/5.1/nuxeo-platform-forms-layout-client/src/main/java/org/nuxeo/ecm/platform/forms/layout/facelets/plugins/TextareaWidgetTypeHandler.java (modified) (1 diff)
- org.nuxeo.ecm.platform/branches/5.1/nuxeo-platform-forms-layout-client/src/main/java/org/nuxeo/ecm/platform/forms/layout/service/WebLayoutManagerImpl.java (modified) (1 diff)
- org.nuxeo.ecm.platform/branches/5.1/nuxeo-platform-forms-layout-client/src/test/java/org/nuxeo/ecm/platform/layout/facelets/TestWidgetTypeHandler.java (modified) (1 diff)
- org.nuxeo.ecm.platform/branches/5.1/nuxeo-platform-forms-layout-client/src/test/java/org/nuxeo/ecm/platform/layout/service/TestLayoutComponent.java (modified) (3 diffs)
- org.nuxeo.ecm.platform/branches/5.1/nuxeo-platform-forms-layout-client/src/test/java/org/nuxeo/ecm/platform/layout/service/TestLayoutService.java (modified) (2 diffs)
- org.nuxeo.ecm.platform/branches/5.1/nuxeo-platform-mimetype-core/src/test/java/org/nuxeo/ecm/platform/mimetype/TestMimetypeSniffing.java (modified) (1 diff)
- org.nuxeo.ecm.platform/branches/5.1/nuxeo-platform-modifier/src/test/java/org/nuxeo/ecm/platform/modifier/AbstractPluginTestCase.java (modified) (1 diff)
- org.nuxeo.ecm.platform/branches/5.1/nuxeo-platform-ui-web/src/main/java/org/nuxeo/ecm/platform/ui/web/model/impl/EditableModelRowEvent.java (modified) (1 diff)
- org.nuxeo.ecm.platform/branches/5.1/nuxeo-platform-ui-web/src/main/java/org/nuxeo/ecm/platform/ui/web/model/impl/SelectDataModelImpl.java (modified) (2 diffs)
- org.nuxeo.ecm.platform/branches/5.1/nuxeo-platform-ui-web/src/main/java/org/nuxeo/ecm/platform/ui/web/model/impl/SelectDocumentDataModelRowComparator.java (modified) (3 diffs)
- org.nuxeo.ecm.platform/branches/5.1/nuxeo-platform-ui-web/src/main/java/org/nuxeo/ecm/platform/ui/web/model/impl/SortableSelectDocumentDataModelImpl.java (modified) (2 diffs)
- org.nuxeo.ecm.platform/branches/5.1/nuxeo-platform-ui-web/src/main/java/org/nuxeo/ecm/platform/ui/web/resolver/ContextStringWrapper.java (modified) (1 diff)
- org.nuxeo.ecm.platform/branches/5.1/nuxeo-platform-versioning-core/src/test/java/org/nuxeo/ecm/platform/versioning/TestVersioningAdapter.java (modified) (1 diff)
- org.nuxeo.ecm.platform/branches/5.1/nuxeo-platform-versioning-core/src/test/java/org/nuxeo/ecm/platform/versioning/TestVersioningDocEdit.java (modified) (1 diff)
- org.nuxeo.ecm.platform/branches/5.1/nuxeo-platform-workflow-document-facade/src/test/java/org/nuxeo/ecm/platform/workflow/document/ejb/AbstractWorkflowRulesServiceTestCase.java (modified) (2 diffs)
- org.nuxeo.ecm.platform/branches/5.1/nuxeo-platform-workflow-document-facade/src/test/java/org/nuxeo/ecm/platform/workflow/document/ejb/TestWorkItemsListsBeanRemote.java (modified) (2 diffs)
- org.nuxeo.ecm.platform/branches/5.1/nuxeo-platform-workflow-document-facade/src/test/java/org/nuxeo/ecm/platform/workflow/document/ejb/TestWorkflowDocumentBeanRemote.java (modified) (1 diff)
- org.nuxeo.ecm.platform/branches/5.1/nuxeo-platform-workflow-document-facade/src/test/java/org/nuxeo/ecm/platform/workflow/document/ejb/TestWorkflowRulesBean.java (modified) (1 diff)
- org.nuxeo.ecm.platform/branches/5.1/nuxeo-platform/src/test/java/org/nuxeo/ecm/platform/TestNXP.java (modified) (3 diffs)
- org.nuxeo.theme/branches/5.1/nuxeo-theme-core/src/main/java/org/nuxeo/theme/presets/PaletteIdentifyException.java (modified) (1 diff)
- org.nuxeo.theme/branches/5.1/nuxeo-theme-core/src/main/java/org/nuxeo/theme/presets/PaletteParseException.java (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
org.nuxeo.ecm.core/branches/1.4/nuxeo-core-api/src/main/java/org/nuxeo/ecm/core/api/Sorter.java
r28347 r28493 21 21 22 22 import java.util.Comparator; 23 import java.io.Serializable; 23 24 24 25 /** … … 28 29 * 29 30 */ 30 public interface Sorter extends Comparator<DocumentModel> {31 public interface Sorter extends Comparator<DocumentModel>, Serializable { 31 32 32 33 } org.nuxeo.ecm.platform/branches/5.1/nuxeo-platform-audit-client/src/test/java/org/nuxeo/ecm/platform/audit/web/TestRegisterAuditAction.java
r18892 r28493 32 32 ActionService as; 33 33 34 @Override 34 35 public void setUp() throws Exception { 35 36 super.setUp(); 36 deploy ("actions-bundle.xml");37 deploy ("nxauditclient-bundle.xml");37 deployContrib("actions-bundle.xml"); 38 deployContrib("nxauditclient-bundle.xml"); 38 39 as = (ActionService) runtime.getComponent(ActionService.ID); 39 40 } 40 41 42 @Override 41 43 public void tearDown() throws Exception { 42 44 super.tearDown(); … … 44 46 45 47 public void testRegistration() { 46 47 48 Action act1 = as.getActionRegistry().getAction("TAB_CONTENT_HISTORY"); 48 49 49 50 assertEquals("action.view.history", act1.getLabel()); 50 51 51 assertEquals("/icons/file.gif", act1.getIcon()); 52 53 52 assertEquals("/incl/tabs/document_history.xhtml", act1.getLink()); 54 55 53 assertTrue(act1.isEnabled()); 56 54 } org.nuxeo.ecm.platform/branches/5.1/nuxeo-platform-audit-core/src/test/java/org/nuxeo/ecm/platform/audit/TestEventConfService.java
r19481 r28493 32 32 private NXAuditEvents service; 33 33 34 @Override 34 35 public void setUp() throws Exception { 35 36 super.setUp(); 36 deploy ("nxaudit-test-definitions.xml");37 deployContrib("nxaudit-test-definitions.xml"); 37 38 38 39 service = NXAudit.getNXAuditEventsService(); org.nuxeo.ecm.platform/branches/5.1/nuxeo-platform-audit-io/src/main/java/org/nuxeo/ecm/platform/audit/io/IOAuditAdapter.java
r28476 r28493 86 86 } 87 87 88 protected CoreSession getCoreSession(String repo) throws Exception {88 protected static CoreSession getCoreSession(String repo) throws Exception { 89 89 CoreSession coreSession; 90 90 try { … … 99 99 } 100 100 101 protected Logs getLogService() throws Exception {101 protected static Logs getLogService() throws Exception { 102 102 Logs logService; 103 103 try { … … 114 114 } 115 115 116 private long createLogEntry(DocumentMessage doc) throws AuditException {116 private static long createLogEntry(DocumentMessage doc) throws AuditException { 117 117 NXAuditEvents service = NXAudit.getNXAuditEventsService(); 118 118 LogEntry logEntry = service.computeLogEntry(doc); … … 123 123 throw new AuditException(e); 124 124 } 125 logService.addLogEntries(Arrays.asList( new LogEntry[] { logEntry }));125 logService.addLogEntries(Arrays.asList(logEntry)); 126 126 return logEntry.getId(); 127 127 } … … 214 214 DocumentRef docRef = new IdRef(logEntry.getDocUUID()); 215 215 216 List<LogEntry> logEntries = null; 217 logEntries = docLogs.get(docRef); 216 List<LogEntry> logEntries = docLogs.get(docRef); 218 217 if (logEntries == null) { 219 218 logEntries = new ArrayList<LogEntry>(); … … 223 222 } 224 223 225 IOAuditResources resources = new IOAuditResources(docLogs); 226 return resources; 224 return new IOAuditResources(docLogs); 227 225 } 228 226 … … 294 292 } 295 293 296 IOAuditResources newResources = new IOAuditResources(newResourcesMap); 297 298 return newResources; 294 return new IOAuditResources(newResourcesMap); 299 295 } 300 296 } org.nuxeo.ecm.platform/branches/5.1/nuxeo-platform-audit-io/src/main/java/org/nuxeo/ecm/platform/audit/io/IOLogEntryBase.java
r28460 r28493 47 47 /** 48 48 * Audit log entry importer/exporter. 49 * 49 * <p> 50 50 * Could be overriden to externalize additional information of a redefined 51 51 * LogEntry. … … 60 60 61 61 62 public void write(List<LogEntry> logEntries, OutputStream out)62 public static void write(List<LogEntry> logEntries, OutputStream out) 63 63 throws IOException { 64 64 Document jdoc = writeDocument(logEntries); … … 66 66 } 67 67 68 private Document writeDocument(List<LogEntry> logEntries) {68 private static Document writeDocument(List<LogEntry> logEntries) { 69 69 Document document = DocumentFactory.getInstance().createDocument(); 70 70 document.setName("logEntries"); … … 85 85 * @param logEntry 86 86 */ 87 protected void writeLogEntry(Element logEntryElement, LogEntry logEntry) {87 protected static void writeLogEntry(Element logEntryElement, LogEntry logEntry) { 88 88 logEntryElement.addAttribute("category", logEntry.getCategory()); 89 89 logEntryElement.addAttribute("comment", logEntry.getComment()); … … 100 100 } 101 101 102 public List<LogEntry> read(InputStream in) throws IOException {102 public static List<LogEntry> read(InputStream in) throws IOException { 103 103 Document jDoc = loadXML(in); 104 104 return readDocument(jDoc); … … 110 110 * @param doc 111 111 */ 112 protected List<LogEntry> readDocument(Document doc) {112 protected static List<LogEntry> readDocument(Document doc) { 113 113 List<LogEntry> logEntries = new ArrayList<LogEntry>(); 114 114 115 115 Element rootElement = doc.getRootElement(); 116 Iterator it = rootElement.elementIterator();116 Iterator<Element> it = rootElement.elementIterator(); 117 117 while (it.hasNext()) { 118 Element logEntryElement = (Element)it.next();118 Element logEntryElement = it.next(); 119 119 120 120 LogEntry logEntry = readLogEntry(logEntryElement); … … 131 131 * @param logEntry 132 132 */ 133 protected LogEntry readLogEntry(Element logEntryElement) {133 protected static LogEntry readLogEntry(Element logEntryElement) { 134 134 LogEntryBase logEntry = new LogEntryBase(); 135 135 … … 160 160 * @return 161 161 */ 162 protected DateFormat getDateFormat() {162 protected static DateFormat getDateFormat() { 163 163 return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); 164 164 } 165 165 166 protected void writeXML(Document doc, OutputStream out) throws IOException {166 protected static void writeXML(Document doc, OutputStream out) throws IOException { 167 167 OutputFormat format = OutputFormat.createPrettyPrint(); 168 168 XMLWriter writer = new XMLWriter(out, format); … … 170 170 } 171 171 172 private Document loadXML(InputStream in) throws IOException {172 private static Document loadXML(InputStream in) throws IOException { 173 173 try { 174 174 // the SAXReader is closing the stream so that we need to copy the … … 186 186 } 187 187 188 public List<LogEntry> translate(List<LogEntry> docLogs, DocumentRef newRef) {188 public static List<LogEntry> translate(List<LogEntry> docLogs, DocumentRef newRef) { 189 189 List<LogEntry> newList = new ArrayList<LogEntry>(); 190 190 for (LogEntry logEntry : docLogs) { … … 202 202 * @return 203 203 */ 204 private LogEntry translate(LogEntry logEntry, DocumentRef newRef) {204 private static LogEntry translate(LogEntry logEntry, DocumentRef newRef) { 205 205 LogEntryBase newLogEntry = new LogEntryImpl(); 206 206 org.nuxeo.ecm.platform/branches/5.1/nuxeo-platform-audit-search/src/main/java/org/nuxeo/ecm/platform/audit/search/resources/indexing/AuditIndexableResourceImpl.java
r22566 r28493 69 69 public Serializable getValueFor(String indexableDataName) 70 70 throws IndexingException { 71 72 71 login(); 73 74 72 Serializable value = getLogEntryDataMapFor(logUUID).get( 75 73 indexableDataName); 76 77 74 logout(); 78 79 75 return value; 80 76 } … … 89 85 } 90 86 91 LogEntry entry = null;87 LogEntry entry; 92 88 try { 93 89 entry = logsRemote.getLogEntryByID(logUUID); … … 110 106 } 111 107 112 protected Map<String, Serializable> getLogEntryDataMap(LogEntry entry) {108 protected static Map<String, Serializable> getLogEntryDataMap(LogEntry entry) { 113 109 Map<String, Serializable> dataMap = new HashMap<String, Serializable>(); 114 110 dataMap.put(BuiltinLogEntryData.LOG_ID, entry.getId()); org.nuxeo.ecm.platform/branches/5.1/nuxeo-platform-cache-server/src/test/java/org/nuxeo/ecm/platform/cache/server/TestCacheLocalReplication.java
r21687 r28493 64 64 } 65 65 66 @Override 66 67 protected void tearDown() throws Exception { 67 68 68 if (cacheClient != null) { 69 69 cacheClient.stopService(); 70 70 } 71 72 71 super.tearDown(); 73 72 } org.nuxeo.ecm.platform/branches/5.1/nuxeo-platform-comment/src/main/java/org/nuxeo/ecm/platform/comment/impl/CommentManagerImpl.java
r28456 r28493 368 368 */ 369 369 @Deprecated 370 private String getCurrentUser(DocumentModel target) throws ClientException {370 private static String getCurrentUser(DocumentModel target) throws ClientException { 371 371 String sid = target.getSessionId(); 372 372 CoreSession userSession = getUserSession(sid); org.nuxeo.ecm.platform/branches/5.1/nuxeo-platform-comment/src/main/java/org/nuxeo/ecm/platform/comment/service/CommentService.java
r21754 r28493 54 54 } 55 55 56 @Override 56 57 public void unregisterContribution(Object contribution, 57 58 String extensionPoint, ComponentInstance contributor) { org.nuxeo.ecm.platform/branches/5.1/nuxeo-platform-directory-core/src/main/java/org/nuxeo/ecm/directory/AbstractDirectory.java
r25305 r28493 28 28 import java.util.Map; 29 29 import java.util.Map.Entry; 30 import java.io.Serializable; 30 31 31 32 import org.nuxeo.ecm.core.api.ClientException; … … 101 102 * two values are integers/longs, numbering comparison is used. 102 103 */ 103 public static class EntryComparator implements Comparator<DocumentModel> { 104 public static class EntryComparator implements Comparator<DocumentModel>, 105 Serializable { 104 106 107 private static final long serialVersionUID = -5027588251188034085L; 108 105 109 static final Collator collator = Collator.getInstance(); 106 110 org.nuxeo.ecm.platform/branches/5.1/nuxeo-platform-directory-core/src/main/java/org/nuxeo/ecm/directory/InverseReference.java
r25305 r28493 45 45 } 46 46 47 @Override 47 48 @XNode("@directory") 48 49 public void setTargetDirectoryName(String targetDirectoryName) { org.nuxeo.ecm.platform/branches/5.1/nuxeo-platform-directory-sql/src/main/java/org/nuxeo/ecm/directory/sql/repository/Table.java
r21690 r28493 110 110 */ 111 111 public String getCreateSql(Dialect dialect) { 112 StringBu ffer buf = new StringBuffer();112 StringBuilder buf = new StringBuilder(); 113 113 char openQuote = dialect.openQuote(); 114 114 char closeQuote = dialect.closeQuote(); … … 168 168 */ 169 169 public String getDropSql(Dialect dialect) { 170 StringBu ffer buf = new StringBuffer();170 StringBuilder buf = new StringBuilder(); 171 171 buf.append("drop table "); 172 172 if (dialect.supportsIfExistsBeforeTableName()) { … … 191 191 } 192 192 193 @Override 193 194 public String toString() { 194 195 return getClass().getSimpleName() + '(' + name + ')'; org.nuxeo.ecm.platform/branches/5.1/nuxeo-platform-directory-sql/src/main/java/org/nuxeo/ecm/directory/sql/repository/Update.java
r20218 r28493 65 65 * names. 66 66 * 67 * @param icolumns a returned list of columns bound to free parameters.68 67 * @return the SQL insert statement. 69 68 */ … … 96 95 */ 97 96 public void setWhere(String whereString) { 98 this.where = whereString;97 where = whereString; 99 98 } 100 99 } org.nuxeo.ecm.platform/branches/5.1/nuxeo-platform-filemanager-api/src/main/java/org/nuxeo/ecm/platform/filemanager/api/FileManager.java
r27315 r28493 81 81 Blob input, String path, String fullName) throws Exception; 82 82 83 84 85 83 /** 86 84 * Creates a Folder. … … 95 93 String fullname, String path) throws Exception; 96 94 97 98 95 } org.nuxeo.ecm.platform/branches/5.1/nuxeo-platform-filemanager-api/src/main/java/org/nuxeo/ecm/platform/filemanager/utils/FileManagerUtils.java
r28476 r28493 127 127 } 128 128 129 130 131 129 /** 132 130 * Looking if an existing Document with the same filename exists. … … 175 173 } 176 174 177 178 175 } org.nuxeo.ecm.platform/branches/5.1/nuxeo-platform-filemanager-core/src/main/java/org/nuxeo/ecm/platform/filemanager/service/FileManagerService.java
r28460 r28493 142 142 String fullname, String path) throws ClientException, IOException { 143 143 144 if (!folderImporters.isEmpty()) { 144 if (folderImporters.isEmpty()) { 145 return defaultCreateFolder(documentManager, fullname, path); 146 } else { 145 147 // use the last registered folder importer 146 FolderImporter folderImporter = folderImporters.get(folderImporters.size() - 1); 148 FolderImporter folderImporter = folderImporters.get( 149 folderImporters.size() - 1); 147 150 return folderImporter.create(documentManager, fullname, path, true, 148 151 getTypeService()); 149 } else {150 return defaultCreateFolder(documentManager, fullname, path);151 152 } 152 153 } … … 281 282 282 283 // update the file part and the size property 283 Long size = Long.valueOf(input.getByteArray().length);284 Long size = (long) input.getByteArray().length; 284 285 docModel.setProperty("file", "content", input); 285 286 docModel.setProperty("common", "size", size); … … 294 295 295 296 // TODO : Get type Id from mime/type of the upload 296 Long size = Long.valueOf(input.getByteArray().length);297 Long size = (long) input.getByteArray().length; 297 298 docModel = documentManager.createDocumentModel(path, docId, 298 299 typeName); … … 361 362 362 363 log.debug("Updated the document: " + doc.getName()); 363 364 364 } 365 365 return doc; org.nuxeo.ecm.platform/branches/5.1/nuxeo-platform-filemanager-core/src/main/java/org/nuxeo/ecm/platform/filemanager/service/extension/FolderImporter.java
r28476 r28493 31 31 32 32 DocumentModel create(CoreSession documentManager, String fullname, 33 String path, boolean overwrite, TypeManager typeManager) throws IOException, ClientException; 33 String path, boolean overwrite, TypeManager typeManager) 34 throws IOException, ClientException; 34 35 35 36 String getName(); org.nuxeo.ecm.platform/branches/5.1/nuxeo-platform-filemanager-core/src/main/java/org/nuxeo/ecm/platform/filemanager/utils/FileManagerUtils.java
r28476 r28493 175 175 } 176 176 177 178 177 } org.nuxeo.ecm.platform/branches/5.1/nuxeo-platform-forms-layout-client/src/main/java/org/nuxeo/ecm/platform/forms/layout/facelets/FaceletHandlerHelper.java
r28244 r28493 108 108 public TagAttribute createIdAttribute(String base) { 109 109 String value = generateUniqueId(base); 110 TagAttribute idAttr = new TagAttribute( 111 tagConfig.getTag().getLocation(), "", "id", "id", value); 112 return idAttr; 110 return new TagAttribute(tagConfig.getTag().getLocation(), "", "id", 111 "id", value); 113 112 } 114 113 … … 120 119 public TagAttribute createAttribute(String name, Serializable value) { 121 120 if (value == null || value instanceof String) { 122 TagAttribute idAttr = new TagAttribute( 123 tagConfig.getTag().getLocation(), "", name, name, 124 (String) value); 125 return idAttr; 121 return new TagAttribute(tagConfig.getTag().getLocation(), "", 122 name, name, (String) value); 126 123 } 127 124 return null; 128 125 } 129 126 130 public TagAttributes getTagAttributes(TagAttribute... attributes) {127 public static TagAttributes getTagAttributes(TagAttribute... attributes) { 131 128 if (attributes == null || attributes.length == 0) { 132 129 return null; 133 130 } 134 TagAttributes res = new TagAttributes(attributes); 135 return res; 136 } 137 138 public TagAttributes getTagAttributes(List<TagAttribute> attributes) { 131 return new TagAttributes(attributes); 132 } 133 134 public static TagAttributes getTagAttributes(List<TagAttribute> attributes) { 139 135 return getTagAttributes(attributes.toArray(new TagAttribute[]{})); 140 136 } 141 137 142 public TagAttributes addTagAttribute(TagAttributes orig,138 public static TagAttributes addTagAttribute(TagAttributes orig, 143 139 TagAttribute newAttr) { 144 140 if (orig == null) { … … 194 190 // fill with widget properties 195 191 Map<String, Serializable> properties = widget.getProperties(); 196 TagAttribute attr;197 192 if (properties != null) { 198 193 for (Map.Entry<String, Serializable> property : properties.entrySet()) { 199 attr = createAttribute(property.getKey(), property.getValue()); 194 TagAttribute attr = createAttribute(property.getKey(), 195 property.getValue()); 200 196 if (attr != null) { 201 197 attrs.add(attr); … … 203 199 } 204 200 } 205 TagAttributes attributes = getTagAttributes(attrs); 206 return attributes; 201 return getTagAttributes(attrs); 207 202 } 208 203 … … 266 261 tagConfig, attributes, new LeafFaceletHandler(), 267 262 HtmlMessage.COMPONENT_TYPE, null); 268 ComponentHandler message = new ComponentHandler(config); 269 return message; 263 return new ComponentHandler(config); 270 264 } 271 265 } org.nuxeo.ecm.platform/branches/5.1/nuxeo-platform-forms-layout-client/src/main/java/org/nuxeo/ecm/platform/forms/layout/facelets/LayoutRowTagHandler.java
r27477 r28493 64 64 while (ctx.includeDefinition(parent, 65 65 TemplateClientHelper.generateRowNumber(rowCounter))) { 66 this.nextHandler.apply(ctx, parent);66 nextHandler.apply(ctx, parent); 67 67 rowCounter++; 68 68 } org.nuxeo.ecm.platform/branches/5.1/nuxeo-platform-forms-layout-client/src/main/java/org/nuxeo/ecm/platform/forms/layout/facelets/LayoutRowWidgetTagHandler.java
r27477 r28493 62 62 while (ctx.includeDefinition(parent, 63 63 TemplateClientHelper.generateWidgetNumber(widgetCounter))) { 64 this.nextHandler.apply(ctx, parent);64 nextHandler.apply(ctx, parent); 65 65 widgetCounter++; 66 66 } org.nuxeo.ecm.platform/branches/5.1/nuxeo-platform-forms-layout-client/src/main/java/org/nuxeo/ecm/platform/forms/layout/facelets/LeafFaceletHandler.java
r26053 r28493 44 44 45 45 public void apply(FaceletContext ctx, UIComponent parent) 46 throws IOException, FacesException, FaceletException,ELException {46 throws IOException, FacesException, ELException { 47 47 } 48 48 49 @Override 49 50 public String toString() { 50 51 return "FaceletHandler Tail"; org.nuxeo.ecm.platform/branches/5.1/nuxeo-platform-forms-layout-client/src/main/java/org/nuxeo/ecm/platform/forms/layout/facelets/SubWidgetTagHandler.java
r26053 r28493 63 63 while (ctx.includeDefinition(parent, 64 64 TemplateClientHelper.generateSubWidgetNumber(subWidgetCounter))) { 65 this.nextHandler.apply(ctx, parent);65 nextHandler.apply(ctx, parent); 66 66 subWidgetCounter++; 67 67 } org.nuxeo.ecm.platform/branches/5.1/nuxeo-platform-forms-layout-client/src/main/java/org/nuxeo/ecm/platform/forms/layout/facelets/WidgetTagHandler.java
r28244 r28493 148 148 149 149 public boolean apply(FaceletContext ctx, UIComponent parent, String name) 150 throws IOException, FacesException, FaceletException,ELException {150 throws IOException, FacesException, ELException { 151 151 if (widgetInstance == null) { 152 152 return false; org.nuxeo.ecm.platform/branches/5.1/nuxeo-platform-forms-layout-client/src/main/java/org/nuxeo/ecm/platform/forms/layout/facelets/library/LayoutTagLibrary.java
r26053 r28493 45 45 super(Namespace); 46 46 47 this.addTag
