mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-14 17:58:59 +00:00
Merged DEV/SWIFT to HEAD
25927: (RECORD ONLY) Initial work on a Data List spreadsheet exporter. Needs more work in another iDay, but the basics are in place 25938: (RECORD ONLY) Move the Data List Export Webscript to a dev branch for now 25944: Added copyright notices Enhancements to SOLR remote api client library - get node text content transform status and exception 25945: Removed superfluous file 25952: ALF-7339: SOLR 020 Index track and build from SOLR - WIP - tracking transactions (accounting for holes), Adding and removing leaf docs with ID only, tracker status reporting via admin update handler 25953: ALF-7339: SOLR 020 Index track and build from SOLR - WIP - compile fix 25976: Query related build fixes (mixture of collateral damage from SOLR and OpenCMIS) git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@28117 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -1,3 +1,21 @@
|
||||
/*
|
||||
* Copyright (C) 2005-2011 Alfresco Software Limited.
|
||||
*
|
||||
* This file is part of Alfresco
|
||||
*
|
||||
* Alfresco is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* Alfresco is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package org.alfresco.repo.web.scripts.solr;
|
||||
|
||||
import java.io.IOException;
|
||||
@@ -39,6 +57,9 @@ import org.springframework.extensions.webscripts.WebScriptResponse;
|
||||
*/
|
||||
public class GetNodeContent extends StreamContent
|
||||
{
|
||||
private static final String TRANSFORM_STATUS_HEADER = "X-Alfresco-transformStatus";
|
||||
private static final String TRANSFORM_EXCEPTION_HEADER = "X-Alfresco-transformException";
|
||||
|
||||
private static final Log logger = LogFactory.getLog(GetNodeContent.class);
|
||||
|
||||
/**
|
||||
@@ -110,9 +131,9 @@ public class GetNodeContent extends StreamContent
|
||||
}
|
||||
catch (Throwable e)
|
||||
{
|
||||
if (logger.isInfoEnabled())
|
||||
if (logger.isWarnEnabled())
|
||||
{
|
||||
logger.info("Browser sent badly-formatted If-Modified-Since header: " + modifiedSinceStr);
|
||||
logger.warn("Browser sent badly-formatted If-Modified-Since header: " + modifiedSinceStr);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -151,14 +172,14 @@ public class GetNodeContent extends StreamContent
|
||||
ContentTransformer transformer = contentService.getTransformer(reader.getMimetype(), MimetypeMap.MIMETYPE_TEXT_PLAIN);
|
||||
if(transformer == null)
|
||||
{
|
||||
res.setHeader(TRANSFORM_STATUS_HEADER, "noTransform");
|
||||
res.setStatus(HttpStatus.SC_NO_CONTENT);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
try
|
||||
{
|
||||
// TODO how to ensure UTF-8?
|
||||
// TODO how to ensure UTF-8 in the transformed text?
|
||||
transformer.transform(reader, writer);
|
||||
}
|
||||
catch (ContentIOException e)
|
||||
@@ -181,11 +202,14 @@ public class GetNodeContent extends StreamContent
|
||||
|
||||
if(transformException != null)
|
||||
{
|
||||
res.setHeader("XAlfresco-transformException", transformException.getMessage());
|
||||
res.setHeader(TRANSFORM_STATUS_HEADER, "failed");
|
||||
res.setHeader(TRANSFORM_EXCEPTION_HEADER, transformException.getMessage());
|
||||
res.setStatus(HttpStatus.SC_INTERNAL_SERVER_ERROR);
|
||||
}
|
||||
else
|
||||
{
|
||||
res.setHeader(TRANSFORM_STATUS_HEADER, "ok");
|
||||
res.setStatus(HttpStatus.SC_OK);
|
||||
streamContentImpl(req, res, textReader, false, modified, String.valueOf(modified.getTime()), null);
|
||||
}
|
||||
|
||||
|
@@ -1,3 +1,21 @@
|
||||
/*
|
||||
* Copyright (C) 2005-2011 Alfresco Software Limited.
|
||||
*
|
||||
* This file is part of Alfresco
|
||||
*
|
||||
* Alfresco is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* Alfresco is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package org.alfresco.repo.web.scripts.solr;
|
||||
|
||||
import java.io.IOException;
|
||||
|
@@ -1,3 +1,21 @@
|
||||
/*
|
||||
* Copyright (C) 2005-2011 Alfresco Software Limited.
|
||||
*
|
||||
* This file is part of Alfresco
|
||||
*
|
||||
* Alfresco is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* Alfresco is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package org.alfresco.repo.web.scripts.solr;
|
||||
|
||||
import java.io.IOException;
|
||||
|
@@ -1,3 +1,21 @@
|
||||
/*
|
||||
* Copyright (C) 2005-2011 Alfresco Software Limited.
|
||||
*
|
||||
* This file is part of Alfresco
|
||||
*
|
||||
* Alfresco is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* Alfresco is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package org.alfresco.repo.web.scripts.solr;
|
||||
|
||||
import java.util.List;
|
||||
|
@@ -1,3 +1,21 @@
|
||||
/*
|
||||
* Copyright (C) 2005-2011 Alfresco Software Limited.
|
||||
*
|
||||
* This file is part of Alfresco
|
||||
*
|
||||
* Alfresco is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* Alfresco is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package org.alfresco.repo.web.scripts.solr;
|
||||
|
||||
import java.util.HashMap;
|
||||
|
@@ -1,3 +1,21 @@
|
||||
/*
|
||||
* Copyright (C) 2005-2011 Alfresco Software Limited.
|
||||
*
|
||||
* This file is part of Alfresco
|
||||
*
|
||||
* Alfresco is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* Alfresco is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package org.alfresco.repo.web.scripts.solr;
|
||||
|
||||
import java.io.IOException;
|
||||
|
@@ -1,3 +1,21 @@
|
||||
/*
|
||||
* Copyright (C) 2005-2011 Alfresco Software Limited.
|
||||
*
|
||||
* This file is part of Alfresco
|
||||
*
|
||||
* Alfresco is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* Alfresco is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package org.alfresco.repo.web.scripts.solr;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
@@ -1,3 +1,21 @@
|
||||
/*
|
||||
* Copyright (C) 2005-2011 Alfresco Software Limited.
|
||||
*
|
||||
* This file is part of Alfresco
|
||||
*
|
||||
* Alfresco is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* Alfresco is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package org.alfresco.repo.web.scripts.solr;
|
||||
|
||||
import java.io.IOException;
|
||||
|
@@ -1,3 +1,21 @@
|
||||
/*
|
||||
* Copyright (C) 2005-2011 Alfresco Software Limited.
|
||||
*
|
||||
* This file is part of Alfresco
|
||||
*
|
||||
* Alfresco is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* Alfresco is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package org.alfresco.repo.web.scripts.solr;
|
||||
|
||||
import java.io.PrintWriter;
|
||||
@@ -630,7 +648,7 @@ public class SOLRWebScriptTest extends BaseWebScriptTest
|
||||
});
|
||||
}
|
||||
|
||||
/* public void testGetTransactions1() throws Exception
|
||||
public void testGetTransactions1() throws Exception
|
||||
{
|
||||
long fromCommitTime = System.currentTimeMillis();
|
||||
|
||||
@@ -1028,7 +1046,7 @@ public class SOLRWebScriptTest extends BaseWebScriptTest
|
||||
parameters.setTransactionIds(transactionIds);
|
||||
parameters.setExcludeAspects(excludeAspects);
|
||||
JSONArray nodes = getNodes(parameters, 0, 51);
|
||||
}*/
|
||||
}
|
||||
|
||||
public void testNodeMetaData() throws Exception
|
||||
{
|
||||
@@ -1079,7 +1097,7 @@ public class SOLRWebScriptTest extends BaseWebScriptTest
|
||||
assertEquals("Path element " + i + " is incorrect", expectedPath, path);
|
||||
}
|
||||
}
|
||||
/*
|
||||
|
||||
public void testNodeMetaDataManyNodes() throws Exception
|
||||
{
|
||||
long fromCommitTime = System.currentTimeMillis();
|
||||
@@ -1127,7 +1145,7 @@ public class SOLRWebScriptTest extends BaseWebScriptTest
|
||||
nodeDAO.clear();
|
||||
|
||||
nodesMetaData = getNodesMetaData(nodeIds, 0, 2001);
|
||||
}*/
|
||||
}
|
||||
|
||||
private boolean containsAspect(JSONArray aspectsArray, QName aspect) throws Exception
|
||||
{
|
||||
|
Reference in New Issue
Block a user