AnsweredAssumed Answered

Determine ContentType

Question asked by z3r0 on Sep 22, 2009
Latest reply on Sep 28, 2009 by norgan

I have a method to detect the uuid. How can i detect the content type?

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;

return uuid;