09-22-2009 02:36 PM
String uuid = null;
AuthenticationUtils.startSession("admin", "admin");
final Store STORE = new Store(Constants.WORKSPACE_STORE, "SpacesStore");
// Get a reference to the respository web service
RepositoryServiceSoapBindingStub repositoryService = WebServiceFactory.getRepositoryService();
// Create a query object, looking for all items with alfresco in the name of text
Query query = new Query(Constants.QUERY_LANG_LUCENE, queryText);
QueryResult queryResult = null;
// Execute the query
queryResult = repositoryService.query(STORE, query, false);
// Display the results
ResultSet resultSet = queryResult.getResultSet();
ResultSetRow[] rows = resultSet.getRows();
if (rows != null)
{
// Get the id of the first result
String firstResultId = rows[0].getNode().getId();
uuid = firstResultId;
}
AuthenticationUtils.endSession();
return uuid;
09-22-2009 02:56 PM
QName contentType = nodeService.getType(nodeRef); 09-22-2009 03:21 PM
row[0].getNode().getType() I get the content model. But I want the ContentType, such as PDF, for example application/pdf or image/jpg or only pdf or jpg.
09-26-2009 03:33 PM
09-26-2009 07:00 PM
09-28-2009 03:11 AM
Hi,
thanks for your answer. But if I writeI get the content model. But I want the ContentType, such as PDF, for example application/pdf or image/jpg or only pdf or jpg.row[0].getNode().getType()
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.