Package org.rhq.core.domain.search

Examples of org.rhq.core.domain.search.SavedSearch


    /**
     * @see SavedSearchManagerRemote#getSavedSearchById(Subject, int)
     */
    public SavedSearch getSavedSearchById(Subject subject, int savedSearchId) {
        SavedSearch savedSearch = entityManager.find(SavedSearch.class, savedSearchId);
        validateReadPermission(subject, savedSearch);
        return savedSearch;
    }
View Full Code Here


                Set<SavedSearch> savedSearches = new HashSet<SavedSearch>();
                for (int i = 0; i < 50; i++) {
                    String iStr = i > 9 ? String.valueOf(i) : "0" + String.valueOf(i);
                    if (i < 25) {
                        resources.add(SessionTestHelper.createNewResource(em, "resource-" + iStr, resourceType));
                        SavedSearch savedSearch = new SavedSearch(SearchSubsystem.RESOURCE, "search-" + iStr,
                            "resource-" + iStr, searchesOwner);
                        savedSearchManager.createSavedSearch(searchesOwner, savedSearch);
                        savedSearches.add(savedSearch);
                    } else {
                        resourceGroups.add(SessionTestHelper.createNewCompatibleGroupForRole(em, searchesOwnerRole,
                            "group-" + iStr, resourceType));
                        SavedSearch savedSearch = new SavedSearch(SearchSubsystem.GROUP, "search-" + iStr, "group-"
                            + iStr, searchesOwner);
                        savedSearchManager.createSavedSearch(searchesOwner, savedSearch);
                        savedSearches.add(savedSearch);
                    }
                }
View Full Code Here

        return searchTextItem.getValueAsString();
    }

    private void createSavedSearch(final String name, final String pattern) {
        Subject subject = UserSessionManager.getSessionSubject();
        SavedSearch newSavedSearch = new SavedSearch(searchSubsystem, name, pattern, subject);
        searchService.createSavedSearch(newSavedSearch, new AsyncCallback<Integer>() {

            public void onSuccess(Integer newSavedSearchId) {
                Message message = new Message(MSG.view_searchBar_savedSearch_save(name), Message.Severity.Info);
                CoreGUI.getMessageCenter().notify(message);
View Full Code Here

        });
    }

    public void shouldBeAbleToDeleteASubjectWhoOwnsASavedSearch() {
        // See https://bugzilla.redhat.com/show_bug.cgi?id=952652
        SavedSearch savedSearch = new SavedSearch(SearchSubsystem.GROUP, "fake saved search", "pipo", subjectManager.getSubjectByName(ITEST_USER));
        Integer savedSearchId = savedSearchManager.createSavedSearch(subjectManager.getOverlord(), savedSearch);
        boolean subjectDeleted = false;
        try {
            deleteITestSubject();
            subjectDeleted = true;
View Full Code Here

TOP

Related Classes of org.rhq.core.domain.search.SavedSearch

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.