conflict_resolution
stringlengths
27
16k
<<<<<<< private void clearCache() { DatabaseManager.deleteAllFriends(getActivity()); // TODO SF clear something else } private void saveUserLearnedDrawer() { ======= private void selectItem(int position) { currentSelectedPosition = position; if (drawerListView != null) { drawerListView.setItemChecked(position, true); } if (drawerLayout != null) { drawerLayout.closeDrawer(fragmentContainerView); } if (callbacks != null) { callbacks.onNavigationDrawerItemSelected(position); } } private void logout() { ConfirmDialog dialog = ConfirmDialog.newInstance(R.string.dlg_logout, R.string.dlg_confirm); dialog.setPositiveButton(new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { baseActivity.showProgress(); FacebookHelper.logout(); QBLogoutCommand.start(baseActivity); } }); dialog.show(getFragmentManager(), null); } private void saveUserLearnedDrawer() { >>>>>>> private void selectItem(int position) { currentSelectedPosition = position; if (drawerListView != null) { drawerListView.setItemChecked(position, true); } if (drawerLayout != null) { drawerLayout.closeDrawer(fragmentContainerView); } if (callbacks != null) { callbacks.onNavigationDrawerItemSelected(position); } } private void logout() { ConfirmDialog dialog = ConfirmDialog.newInstance(R.string.dlg_logout, R.string.dlg_confirm); dialog.setPositiveButton(new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { baseActivity.showProgress(); FacebookHelper.logout(); QBLogoutCommand.start(baseActivity); } }); dialog.show(getFragmentManager(), null); } private void clearCache() { DatabaseManager.deleteAllFriends(getActivity()); // TODO SF clear something else } private void saveUserLearnedDrawer() { <<<<<<< public QMActionBarDrawerToggle(Activity activity, DrawerLayout drawerLayout, int drawlerImageRes, int openDrawlerContentDescRes, int closeDrawlerContentDescRes) { super(activity, drawerLayout, drawlerImageRes, openDrawlerContentDescRes, closeDrawlerContentDescRes); ======= public QMActionBarDrawerToggle(Activity activity, DrawerLayout drawerLayout, int drawerImageRes, int openDrawerContentDescRes, int closeDrawerContentDescRes) { super(activity, drawerLayout, drawerImageRes, openDrawerContentDescRes, closeDrawerContentDescRes); >>>>>>> public QMActionBarDrawerToggle(Activity activity, DrawerLayout drawerLayout, int drawerImageRes, int openDrawerContentDescRes, int closeDrawerContentDescRes) { super(activity, drawerLayout, drawerImageRes, openDrawerContentDescRes, closeDrawerContentDescRes);
<<<<<<< public static final String LOAD_GROUP_DIALOG_ACTION = "load_group_dialog_action"; public static final String LEAVE_GROUP_DIALOG_ACTION = "leave_group_group_action"; public static final String ADD_FRIENDS_TO_GROUP_ACTION = "add_friends_to_group_action"; public static final String UPDATE_GROUP_NAME_ACTION = "update_group_name_action"; ======= public static final String UPDATE_STATUS_MESSAGE_ACTION = "update_status_message_action"; public static final String SEND_PUSH_ACTION = "send_push_action"; >>>>>>> public static final String LOAD_GROUP_DIALOG_ACTION = "load_group_dialog_action"; public static final String LEAVE_GROUP_DIALOG_ACTION = "leave_group_group_action"; public static final String ADD_FRIENDS_TO_GROUP_ACTION = "add_friends_to_group_action"; public static final String UPDATE_GROUP_NAME_ACTION = "update_group_name_action"; public static final String UPDATE_STATUS_MESSAGE_ACTION = "update_status_message_action"; public static final String SEND_PUSH_ACTION = "send_push_action"; <<<<<<< public static final String LOAD_GROUP_DIALOG_SUCCESS_ACTION = "load_group_dialog_success_action"; public static final String LOAD_GROUP_DIALOG_FAIL_ACTION = "load_group_dialog_fail_action"; public static final String LEAVE_GROUP_DIALOG_SUCCESS_ACTION = "leave_group_dialog_success_action"; public static final String LEAVE_GROUP_DIALOG_FAIL_ACTION = "leave_group_dialog_fail_action"; public static final String ADD_FRIENDS_TO_GROUP_SUCCESS_ACTION = "add_friends_to_group_success_action"; public static final String ADD_FRIENDS_TO_GROUP_FAIL_ACTION = "add_friends_to_group_fail_action"; public static final String UPDATE_GROUP_NAME_SUCCESS_ACTION = "update_group_name_success_action"; public static final String UPDATE_GROUP_NAME_FAIL_ACTION = "update_group_name_fail_action"; ======= public static final String UPDATE_STATUS_MESSAGE_SUCCESS_ACTION = "update_status_message_success_action"; public static final String UPDATE_STATUS_MESSAGE_FAIL_ACTION = "update_status_message_fail_action"; public static final String SEND_PUSH_MESSAGES_SUCCESS_ACTION = "send_push_message_success_action"; public static final String SEND_PUSH_MESSAGES_FAIL_ACTION = "send_push_message_fail_action"; >>>>>>> public static final String UPDATE_STATUS_MESSAGE_SUCCESS_ACTION = "update_status_message_success_action"; public static final String UPDATE_STATUS_MESSAGE_FAIL_ACTION = "update_status_message_fail_action"; public static final String SEND_PUSH_MESSAGES_SUCCESS_ACTION = "send_push_message_success_action"; public static final String SEND_PUSH_MESSAGES_FAIL_ACTION = "send_push_message_fail_action"; public static final String LOAD_GROUP_DIALOG_SUCCESS_ACTION = "load_group_dialog_success_action"; public static final String LOAD_GROUP_DIALOG_FAIL_ACTION = "load_group_dialog_fail_action"; public static final String LEAVE_GROUP_DIALOG_SUCCESS_ACTION = "leave_group_dialog_success_action"; public static final String LEAVE_GROUP_DIALOG_FAIL_ACTION = "leave_group_dialog_fail_action"; public static final String ADD_FRIENDS_TO_GROUP_SUCCESS_ACTION = "add_friends_to_group_success_action"; public static final String ADD_FRIENDS_TO_GROUP_FAIL_ACTION = "add_friends_to_group_fail_action"; public static final String UPDATE_GROUP_NAME_SUCCESS_ACTION = "update_group_name_success_action"; public static final String UPDATE_GROUP_NAME_FAIL_ACTION = "update_group_name_fail_action"; <<<<<<< public static final String EXTRA_GROUP_NAME = "group_name"; ======= public static final String EXTRA_DATE_LAST_UPDATE_HISTORY = "last_update_history"; public static final String EXTRA_MESSAGE_ID = "message_id"; public static final String EXTRA_STATUS_MESSAGE = "status_message"; >>>>>>> public static final String EXTRA_GROUP_NAME = "group_name"; public static final String EXTRA_DATE_LAST_UPDATE_HISTORY = "last_update_history"; public static final String EXTRA_MESSAGE_ID = "message_id"; public static final String EXTRA_STATUS_MESSAGE = "status_message";
<<<<<<< import java.util.Collection; import java.util.LinkedHashSet; ======= import java.util.LinkedHashSet; >>>>>>> import java.util.LinkedHashSet; <<<<<<< private Collection<DrugIngredient> ingredients; ======= private Set<DrugReferenceMap> drugReferenceMaps; >>>>>>> private Set<DrugReferenceMap> drugReferenceMaps; <<<<<<< /** * Convenience method that returns a display name for the drug, defaults to drug.name * * @return the display name * @since 1.8.5, 1.9.4, 1.10 */ public String getDisplayName() { if (StringUtils.isNotBlank(getName())) { return getName(); } if (getConcept() != null) { return getConcept().getName().getName(); } return ""; } ======= /** * Convenience method that returns a display name for the drug, defaults to drug.name * * @return the display name * @since 1.8.5, 1.9.4, 1.10 */ public String getDisplayName() { if (StringUtils.isNotBlank(getName())) return getName(); if (getConcept() != null) return getConcept().getName().getName(); return ""; } /** * @return Returns the drugReferenceMaps. * @since 1.10 */ public Set<DrugReferenceMap> getDrugReferenceMaps() { if (drugReferenceMaps == null) { drugReferenceMaps = new LinkedHashSet<DrugReferenceMap>(); } return drugReferenceMaps; } /** * @param drugReferenceMaps The drugReferenceMaps to set. * @since 1.10 */ public void setDrugReferenceMaps(Set<DrugReferenceMap> drugReferenceMaps) { this.drugReferenceMaps = drugReferenceMaps; } /** * Add the given DrugReferenceMap object to this drug's list of drug reference mappings. If there is * already a corresponding DrugReferenceMap object for this concept, this one will not be added. * * @param drugReferenceMap * @since 1.10 * * @should set drug as the drug to which a mapping is being added * * @should should not add duplicate drug reference maps */ public void addDrugReferenceMap(DrugReferenceMap drugReferenceMap) { if (drugReferenceMap != null && !getDrugReferenceMaps().contains(drugReferenceMap)) { drugReferenceMap.setDrug(this); if (drugReferenceMap.getConceptMapType() == null) { drugReferenceMap.setConceptMapType(Context.getConceptService().getDefaultConceptMapType()); } getDrugReferenceMaps().add(drugReferenceMap); } } >>>>>>> /** * Convenience method that returns a display name for the drug, defaults to drug.name * * @return the display name * @since 1.8.5, 1.9.4, 1.10 */ public String getDisplayName() { if (StringUtils.isNotBlank(getName())) { return getName(); } if (getConcept() != null) { return getConcept().getName().getName(); } return ""; } /** * @return Returns the drugReferenceMaps. * @since 1.10 */ public Set<DrugReferenceMap> getDrugReferenceMaps() { if (drugReferenceMaps == null) { drugReferenceMaps = new LinkedHashSet<DrugReferenceMap>(); } return drugReferenceMaps; } /** * @param drugReferenceMaps The drugReferenceMaps to set. * @since 1.10 */ public void setDrugReferenceMaps(Set<DrugReferenceMap> drugReferenceMaps) { this.drugReferenceMaps = drugReferenceMaps; } /** * Add the given DrugReferenceMap object to this drug's list of drug reference mappings. If there is * already a corresponding DrugReferenceMap object for this concept, this one will not be added. * * @param drugReferenceMap * @since 1.10 * * @should set drug as the drug to which a mapping is being added * * @should should not add duplicate drug reference maps */ public void addDrugReferenceMap(DrugReferenceMap drugReferenceMap) { if (drugReferenceMap != null && !getDrugReferenceMaps().contains(drugReferenceMap)) { drugReferenceMap.setDrug(this); if (drugReferenceMap.getConceptMapType() == null) { drugReferenceMap.setConceptMapType(Context.getConceptService().getDefaultConceptMapType()); } getDrugReferenceMaps().add(drugReferenceMap); } }
<<<<<<< if (purgeComplexData(obs) == false) { throw new APIException("Obs.error.unable.purge.complex.data", new Object[] { obs }); ======= if (!purgeComplexData(obs)) { throw new APIException("Unable to purge complex data for obs: " + obs); >>>>>>> if (!purgeComplexData(obs)) { throw new APIException("Obs.error.unable.purge.complex.data", new Object[] { obs }); <<<<<<< if (includeVoided == true) { throw new APIException("Obs.error.voided.no.longer.allowed", (Object[]) null); ======= if (includeVoided) { throw new APIException("Voided observations are no longer allowed to be queried"); >>>>>>> if (includeVoided) { throw new APIException("Obs.error.voided.no.longer.allowed", (Object[]) null);
<<<<<<< ======= import org.openmrs.scheduler.SchedulerService; import org.openmrs.scheduler.TaskDefinition; >>>>>>> import org.openmrs.scheduler.SchedulerService; import org.openmrs.scheduler.TaskDefinition; <<<<<<< /** ======= /* * Name of the concept word update task. A constant, because we only manage * a single task with this name. */ public static final String CONCEPT_WORD_UPDATE_TASK_NAME = "Update Concept Index"; /** >>>>>>> /** <<<<<<< Errors errors = new BindException(concept, "concept"); new ConceptValidator().validate(concept, errors); if (errors.hasErrors()) throw new APIException("Validation errors found: " + errors.getAllErrors()); concept.setDateChanged(new Date()); ======= >>>>>>> concept.setDateChanged(new Date()); <<<<<<< ======= * @see ConceptService#getConcepts(String, List, boolean, List, List, List, List, Concept, * Integer, Integer) */ @Deprecated @Transactional(readOnly = true) public List<ConceptWord> getConceptWords(String phrase, List<Locale> locales, boolean includeRetired, List<ConceptClass> requireClasses, List<ConceptClass> excludeClasses, List<ConceptDatatype> requireDatatypes, List<ConceptDatatype> excludeDatatypes, Concept answerToConcept, Integer start, Integer size) { if (requireClasses == null) { requireClasses = new Vector<ConceptClass>(); } if (excludeClasses == null) { excludeClasses = new Vector<ConceptClass>(); } if (requireDatatypes == null) { requireDatatypes = new Vector<ConceptDatatype>(); } if (excludeDatatypes == null) { excludeDatatypes = new Vector<ConceptDatatype>(); } List<ConceptWord> conceptWords = dao.getConceptWords(phrase, locales, includeRetired, requireClasses, excludeClasses, requireDatatypes, excludeDatatypes, answerToConcept, start, size); return weightWords(phrase, locales, conceptWords); } /** * @see ConceptService#getConceptWords(String, Locale) */ @Deprecated @Transactional(readOnly = true) public List<ConceptWord> getConceptWords(String phrase, Locale locale) throws APIException { List<Locale> locales = new Vector<Locale>(); locales.add(locale); return Context.getConceptService().getConceptWords(phrase, locales, false, null, null, null, null, null, null, null); } /** * @see ConceptService#findConcepts(String, Locale, boolean, int, int) */ @Deprecated @Transactional(readOnly = true) public List<ConceptWord> findConcepts(String phrase, Locale locale, boolean includeRetired, int start, int size) { List<Locale> locales = new Vector<Locale>(); locales.add(locale); // delegate to the non-deprecated method List<ConceptWord> conceptWords = Context.getConceptService().getConceptWords(phrase, locales, includeRetired, null, null, null, null, null, start, size); List<ConceptWord> subList = conceptWords.subList(start, start + size); return subList; } /** * @see ConceptService#findConcepts(String, Locale, boolean) */ @Deprecated @Transactional(readOnly = true) public List<ConceptWord> findConcepts(String phrase, Locale locale, boolean includeRetired) { List<Locale> locales = new Vector<Locale>(); locales.add(locale); return Context.getConceptService().getConceptWords(phrase, locales, includeRetired, null, null, null, null, null, null, null); } /** * @see ConceptService#findConcepts(String, Locale, boolean, List, List, List, List) */ @Deprecated @Transactional(readOnly = true) public List<ConceptWord> findConcepts(String phrase, Locale locale, boolean includeRetired, List<ConceptClass> requireClasses, List<ConceptClass> excludeClasses, List<ConceptDatatype> requireDatatypes, List<ConceptDatatype> excludeDatatypes) { List<Locale> locales = new Vector<Locale>(); locales.add(locale); return Context.getConceptService().getConceptWords(phrase, locales, includeRetired, requireClasses, excludeClasses, requireDatatypes, excludeDatatypes, null, null, null); } /** * @see ConceptService#findConcepts(String, List, boolean, List, List, List, List) */ @Deprecated @Transactional(readOnly = true) public List<ConceptWord> findConcepts(String phrase, List<Locale> locales, boolean includeRetired, List<ConceptClass> requireClasses, List<ConceptClass> excludeClasses, List<ConceptDatatype> requireDatatypes, List<ConceptDatatype> excludeDatatypes) { return Context.getConceptService().getConceptWords(phrase, locales, includeRetired, requireClasses, excludeClasses, requireDatatypes, excludeDatatypes, null, null, null); } /** >>>>>>> <<<<<<< ======= * @see ConceptService#findConceptAnswers(String, Locale, Concept, boolean) */ @Deprecated @Transactional(readOnly = true) public List<ConceptWord> findConceptAnswers(String phrase, Locale locale, Concept concept, boolean includeRetired) { return Context.getConceptService().getConceptAnswers(phrase, locale, concept); } /** * @see ConceptService#findConceptAnswers(String, Locale, Concept) */ @Deprecated @Transactional(readOnly = true) public List<ConceptWord> getConceptAnswers(String phrase, Locale locale, Concept concept) throws APIException { List<Locale> locales = new Vector<Locale>(); locales.add(locale); List<ConceptWord> conceptWords = Context.getConceptService().getConceptWords(phrase, locales, false, null, null, null, null, concept, null, null); return weightWords(phrase, locales, conceptWords); } /** >>>>>>> <<<<<<< ======= * Convenience method * * @param searchedWords * @param matchedString * @return */ private double getPercentMatched(Collection<String> searchedWords, String matchedString) { List<String> subList = ConceptWord.getUniqueWords(matchedString); double size = ConceptWord.splitPhrase(matchedString).length; // total // # of // words double matches = 0.0; for (String s : subList) { s = s.toUpperCase(); for (String p : searchedWords) { p = p.toUpperCase(); if (p.startsWith(s)) { matches += 1.0; } } } return matches == 0 ? 0 : (matches / size); } /** >>>>>>> <<<<<<< ======= * This will weight and sort the concepts according to how many of the words in the name match * the words in the search phrase. * * @param phrase that was used to get this search * @param locales List<Locale> that were used to get this search * @param conceptWords the words that were found via a db search and now must be weighted before * being shown to the user * @return List<ConceptWord> object containing sorted <code>ConceptWord</code>s * @should not fail with null phrase * @should weigh preferred names higher than other names in the locale * @should weigh a fully specified name higher than an indexTerm in the locale * @should weigh a fully specified name higher than a synonym in the locale * @should weight names that contain all words in search phrase higher than names that dont * @should weight better matches higher than lower matches */ @Transactional(readOnly = true) protected List<ConceptWord> weightWords(String phrase, List<Locale> locales, List<ConceptWord> conceptWords) { // Map<ConceptId, ConceptWord> Map<Integer, ConceptWord> uniqueConcepts = new HashMap<Integer, ConceptWord>(); // phrase words if (phrase == null) { phrase = ""; } List<String> searchedWords = ConceptWord.getUniqueWords(phrase); Integer conceptId = null; Concept concept = null; ConceptName conceptName = null; for (ConceptWord currentWord : conceptWords) { concept = currentWord.getConcept(); conceptId = concept.getConceptId(); conceptName = currentWord.getConceptName(); currentWord.setWeight(0.0); // check each locale the user is searching in for name preference for (Locale locale : locales) { // We weight matches on preferred names higher if (conceptName.isPreferredInCountry(locale.getCountry())) { currentWord.increaseWeight(5.0); } else if (conceptName.isPreferredInLanguage(locale.getLanguage())) { currentWord.increaseWeight(3.0); } else if (conceptName.isPreferred()) { currentWord.increaseWeight(1.0); } } // increase the weight by a factor of the % of words matched Double percentMatched = getPercentMatched(searchedWords, conceptName.getName()); currentWord.increaseWeight(5.0 * percentMatched); List<String> nameWords = ConceptWord.getUniqueWords(conceptName.getName()); // if the conceptName doesn't contain all of the search words, lower // the weighting if (!containsAll(nameWords, searchedWords)) { currentWord.increaseWeight(-2.0); } log.debug("Weight for: " + conceptName.getName() + " is: " + currentWord.getWeight()); if (uniqueConcepts.containsKey(conceptId)) { // if we've seen another name for this concept already, check // the name weightings ConceptWord previousWord = uniqueConcepts.get(conceptId); if (currentWord.getWeight() > previousWord.getWeight()) { uniqueConcepts.put(conceptId, currentWord); } } else { // its not in the list, add it uniqueConcepts.put(conceptId, currentWord); } } conceptWords = new Vector<ConceptWord>(); conceptWords.addAll(uniqueConcepts.values()); Collections.sort(conceptWords); return conceptWords; } /** >>>>>>> <<<<<<< ======= private TaskDefinition createConceptIndexUpdateTask() { TaskDefinition conceptIndexUpdateTaskDef = new TaskDefinition(); conceptIndexUpdateTaskDef.setTaskClass("org.openmrs.scheduler.tasks.ConceptIndexUpdateTask"); conceptIndexUpdateTaskDef.setRepeatInterval(0L); // zero interval means do not repeat conceptIndexUpdateTaskDef.setStartOnStartup(false); conceptIndexUpdateTaskDef.setStartTime(null); // to induce immediate execution conceptIndexUpdateTaskDef.setName(CONCEPT_WORD_UPDATE_TASK_NAME); conceptIndexUpdateTaskDef .setDescription("Iterates through the concept dictionary, re-creating concept index (which are used for searcing). This task is started when using the \"Update Concept Index Storage\" page and no range is given. This task stops itself when one iteration has completed."); return conceptIndexUpdateTaskDef; } >>>>>>> <<<<<<< Context.updateSearchIndexForType(Concept.class); ======= checkIfLocked(); SchedulerService schedService = Context.getSchedulerService(); // Create task if not exist TaskDefinition conceptIndexUpdateTaskDef = schedService.getTaskByName(CONCEPT_WORD_UPDATE_TASK_NAME); if (conceptIndexUpdateTaskDef == null) { conceptIndexUpdateTaskDef = createConceptIndexUpdateTask(); schedService.saveTask(conceptIndexUpdateTaskDef); } // Schedule task schedService.scheduleIfNotRunning(conceptIndexUpdateTaskDef); } /** * Convenience method that creates a list of ConceptSearchResults from the specified list of * ConceptWords * * @param conceptWords * @return */ private List<ConceptSearchResult> createSearchResultsList(List<ConceptWord> conceptWords) { if (CollectionUtils.isNotEmpty(conceptWords)) { ArrayList<ConceptSearchResult> conceptSearchResults = new ArrayList<ConceptSearchResult>(); for (ConceptWord conceptWord : conceptWords) { if (conceptWord != null) { // constructor ConceptSearchResult(ConceptWord) is not // visible here conceptSearchResults.add(new ConceptSearchResult(conceptWord.getWord(), conceptWord.getConcept(), conceptWord.getConceptName(), conceptWord.getWeight())); } } return conceptSearchResults; } return Collections.emptyList(); >>>>>>> Context.updateSearchIndexForType(Concept.class); <<<<<<< List<ConceptSearchResult> concepts = dao.getConcepts(phrase, locales, includeRetired, requireClasses, excludeClasses, requireDatatypes, excludeDatatypes, answersToConcept, null, null); return concepts.size(); ======= } return OpenmrsUtil.convertToInteger(dao.getCountOfConceptWords(phrase, locales, includeRetired, requireClasses, excludeClasses, requireDatatypes, excludeDatatypes, answersToConcept, true)); >>>>>>> } List<ConceptSearchResult> concepts = dao.getConcepts(phrase, locales, includeRetired, requireClasses, excludeClasses, requireDatatypes, excludeDatatypes, answersToConcept, null, null); return concepts.size();
<<<<<<< public static void updateSearchIndex() { getContextDAO().updateSearchIndex(); } public static void updateSearchIndexForType(Class<?> type) { getContextDAO().updateSearchIndexForType(type); } public static void updateSearchIndexForObject(Object object) { getContextDAO().updateSearchIndexForObject(object); } ======= /** * @see org.openmrs.api.context.ServiceContext#setUseSystemClassLoader(boolean) * @since 1.10 */ public static void setUseSystemClassLoader(boolean useSystemClassLoader) { getServiceContext().setUseSystemClassLoader(useSystemClassLoader); } /** * @see org.openmrs.api.context.ServiceContext#isUseSystemClassLoader() * @since 1.10 */ public static boolean isUseSystemClassLoader() { return getServiceContext().isUseSystemClassLoader(); } >>>>>>> public static void updateSearchIndex() { getContextDAO().updateSearchIndex(); } public static void updateSearchIndexForType(Class<?> type) { getContextDAO().updateSearchIndexForType(type); } public static void updateSearchIndexForObject(Object object) { getContextDAO().updateSearchIndexForObject(object); } /** * @see org.openmrs.api.context.ServiceContext#setUseSystemClassLoader(boolean) * @since 1.10 */ public static void setUseSystemClassLoader(boolean useSystemClassLoader) { getServiceContext().setUseSystemClassLoader(useSystemClassLoader); } /** * @see org.openmrs.api.context.ServiceContext#isUseSystemClassLoader() * @since 1.10 */ public static boolean isUseSystemClassLoader() { return getServiceContext().isUseSystemClassLoader(); }
<<<<<<< if (includeVoided == true) { throw new APIException("Patient.search.voided", (Object[]) null); ======= if (includeVoided) { throw new APIException("Searching on voided patients is no longer allowed"); >>>>>>> if (includeVoided) { throw new APIException("Patient.search.voided", (Object[]) null);
<<<<<<< import java.util.Locale; import org.junit.Assert; import static org.junit.Assert.assertNull; import static org.junit.Assert.assertTrue; import static org.junit.Assert.assertFalse; ======= >>>>>>>
<<<<<<< import org.openmrs.api.db.hibernate.search.LuceneQuery; import org.openmrs.collection.ListPart; ======= import org.openmrs.util.ConceptMapTypeComparator; >>>>>>> import org.openmrs.api.db.hibernate.search.LuceneQuery; import org.openmrs.collection.ListPart; import org.openmrs.util.ConceptMapTypeComparator; <<<<<<< if (searchOnPhrase) { String search = newNamesQuery(Sets.newHashSet(locale), name, true); query.append(search); ======= if (loc == null) { // TRUNK-2730 replaces this behavior with use of the default locale // throw new DAOException("Locale must be not null"); loc = Context.getLocale(); } String caseSensitiveNamesInConceptNameTable = Context.getAdministrationService().getGlobalProperty( OpenmrsConstants.GP_CASE_SENSITIVE_NAMES_IN_CONCEPT_NAME_TABLE, "true"); criteria.createAlias("names", "names"); MatchMode matchmode = MatchMode.EXACT; if (searchOnPhrase) { matchmode = MatchMode.ANYWHERE; } if (Boolean.valueOf(caseSensitiveNamesInConceptNameTable)) { criteria.add(Restrictions.ilike("names.name", name, matchmode)); } else { if (searchOnPhrase) { criteria.add(Restrictions.like("names.name", name, matchmode)); } else { criteria.add(Restrictions.eq("names.name", name)); } } criteria.add(Restrictions.eq("names.voided", false)); String language = loc.getLanguage(); if (language.length() > 2) { // if searching in specific locale like en_US criteria.add(Restrictions.or(Restrictions.eq("names.locale", loc), Restrictions.eq("names.locale", new Locale(loc.getLanguage().substring(0, 2))))); >>>>>>> if (searchOnPhrase) { String search = newNamesQuery(Sets.newHashSet(locale), name, true); query.append(search); <<<<<<< ======= * @see org.openmrs.api.db.ConceptDAO#updateConceptWord(org.openmrs.Concept) */ public void updateConceptWord(Concept concept) throws DAOException { log.debug("updateConceptWord(" + concept + ")"); if (concept != null) { // remove all old words if (concept.getConceptId() != null && concept.getConceptId() > 0) { deleteConceptWord(concept); } // add all new words Collection<ConceptWord> words = ConceptWord.makeConceptWords(concept); log.debug("words: " + words); for (ConceptWord word : words) { word.setWeight(weighConceptWord(word)); try { if (word.getConceptName().getId() == null) { //The concept name id must be assigned before saving the word, thus we force Hibernate to trigger the insert for concept name. sessionFactory.getCurrentSession().saveOrUpdate(word.getConceptName()); } sessionFactory.getCurrentSession().save(word); } catch (NonUniqueObjectException e) { ConceptWord tmp = (ConceptWord) sessionFactory.getCurrentSession().merge(word); sessionFactory.getCurrentSession().evict(tmp); sessionFactory.getCurrentSession().save(word); } } } } /** * Deletes all concept words for a concept. Called by {@link #updateConceptWord(Concept)} * * @param concept * @throws DAOException */ @SuppressWarnings("unchecked") private void deleteConceptWord(Concept concept) throws DAOException { log.debug("deletConceptWord(" + concept + ")"); if (concept != null) { if (log.isTraceEnabled()) { Criteria crit = sessionFactory.getCurrentSession().createCriteria(ConceptWord.class); crit.add(Restrictions.eq("concept", concept)); List<ConceptWord> words = crit.list(); Integer authUserId = null; if (Context.isAuthenticated()) { authUserId = Context.getAuthenticatedUser().getUserId(); } log.trace(authUserId + "|ConceptWord|" + words); } sessionFactory.getCurrentSession().createQuery("delete ConceptWord where concept = :c").setInteger("c", concept.getConceptId()).executeUpdate(); } } /** >>>>>>> <<<<<<< ======= * @see org.openmrs.api.db.ConceptDAO#getCountOfConceptWords(String, List, boolean, List, List, * List, List, Concept) */ @Override public Long getCountOfConceptWords(String phrase, List<Locale> locales, boolean includeRetired, List<ConceptClass> requireClasses, List<ConceptClass> excludeClasses, List<ConceptDatatype> requireDatatypes, List<ConceptDatatype> excludeDatatypes, Concept answersToConcept, boolean forUniqueConcepts) { if (StringUtils.isBlank(phrase)) { phrase = "%"; // match all } Criteria searchCriteria = createConceptWordSearchCriteria(phrase, locales, includeRetired, requireClasses, excludeClasses, requireDatatypes, excludeDatatypes, answersToConcept); if (searchCriteria != null) { if (forUniqueConcepts) { searchCriteria.setProjection(Projections.countDistinct("concept")); } else { searchCriteria.setProjection(Projections.rowCount()); } return (Long) searchCriteria.uniqueResult(); } return (long) 0; } /** * Utility method that returns a criteria for searching for conceptWords that match the * specified search phrase and arguments * * @param phrase matched to the start of any word in any of the names of a concept * @param locales List<Locale> to restrict to * @param includeRetired boolean if false, will exclude retired concepts * @param requireClasses List<ConceptClass> to restrict to * @param excludeClasses List<ConceptClass> to leave out of results * @param requireDatatypes List<ConceptDatatype> to restrict to * @param excludeDatatypes List<ConceptDatatype> to leave out of results * @param answersToConcept all results will be a possible answer to this concept * @param start all results less than this number will be removed * @param size if non zero, all results after <code>start</code> + <code>size</code> will be * removed * @return the generated criteria object */ private Criteria createConceptWordSearchCriteria(String phrase, List<Locale> locales, boolean includeRetired, List<ConceptClass> requireClasses, List<ConceptClass> excludeClasses, List<ConceptDatatype> requireDatatypes, List<ConceptDatatype> excludeDatatypes, Concept answersToConcept) throws DAOException { //add the language-only portion of locale if its not in the list of locales already List<Locale> localesToAdd = new Vector<Locale>(); for (Locale locale : locales) { Locale languageOnly = new Locale(locale.getLanguage()); if (locales.contains(languageOnly) == false) { localesToAdd.add(languageOnly); } } locales.addAll(localesToAdd); List<String> words = new ArrayList<String>(); if (phrase.equals("%")) { words.add(phrase); } else { //assumes getUniqueWords() removes quote(') characters. (otherwise we would have a security leak) words = ConceptWord.getUniqueWords(phrase); } // these are the answers to restrict on List<Concept> answers = new Vector<Concept>(); if (answersToConcept != null && answersToConcept.getAnswers(false) != null) { for (ConceptAnswer conceptAnswer : answersToConcept.getAnswers(false)) { answers.add(conceptAnswer.getAnswerConcept()); } } if (words.size() > 0 || !answers.isEmpty()) { Criteria searchCriteria = sessionFactory.getCurrentSession().createCriteria(ConceptWord.class, "cw1"); searchCriteria.add(Restrictions.in("locale", locales)); if (!includeRetired) { searchCriteria.createAlias("concept", "concept"); searchCriteria.add(Restrictions.eq("concept.retired", false)); } // Only restrict on answers if there are any if (!answers.isEmpty()) { searchCriteria.add(Restrictions.in("cw1.concept", answers)); } if (words.size() > 0) { Iterator<String> word = words.iterator(); searchCriteria.add(Restrictions.like("word", word.next(), MatchMode.START)); Conjunction junction = Restrictions.conjunction(); while (word.hasNext()) { String w = word.next(); if (log.isDebugEnabled()) { log.debug("Current word: " + w); } DetachedCriteria crit = DetachedCriteria.forClass(ConceptWord.class, "cw2").setProjection( Property.forName("concept")).add(Restrictions.eqProperty("cw2.concept", "cw1.concept")).add( Restrictions.eqProperty("cw2.conceptName", "cw1.conceptName")).add( Restrictions.like("word", w, MatchMode.START)).add(Restrictions.in("locale", locales)); junction.add(Subqueries.exists(crit)); } searchCriteria.add(junction); } if (requireClasses.size() > 0) { searchCriteria.add(Restrictions.in("concept.conceptClass", requireClasses)); } if (excludeClasses.size() > 0) { searchCriteria.add(Restrictions.not(Restrictions.in("concept.conceptClass", excludeClasses))); } if (requireDatatypes.size() > 0) { searchCriteria.add(Restrictions.in("concept.datatype", requireDatatypes)); } if (excludeDatatypes.size() > 0) { searchCriteria.add(Restrictions.not(Restrictions.in("concept.datatype", excludeDatatypes))); } return searchCriteria; } return null; } /** >>>>>>> <<<<<<< if (locales == null) { searchLocales = Sets.newHashSet(Context.getLocale()); } else { searchLocales = Sets.newHashSet(locales); } ======= if (start != null) { searchCriteria.setFirstResult(start); } if (size != null && size > 0) { searchCriteria.setMaxResults(size); } >>>>>>> if (locales == null) { searchLocales = Sets.newHashSet(Context.getLocale()); } else { searchLocales = Sets.newHashSet(locales); }
<<<<<<< import static org.hamcrest.Matchers.containsInAnyOrder; import static org.hamcrest.Matchers.hasItem; import static org.hamcrest.Matchers.is; import static org.hamcrest.Matchers.not; ======= import static org.hamcrest.Matchers.containsInAnyOrder; import static org.hamcrest.Matchers.hasItem; >>>>>>> import static org.hamcrest.Matchers.containsInAnyOrder; import static org.hamcrest.Matchers.hasItem; import static org.hamcrest.Matchers.is; import static org.hamcrest.Matchers.not; <<<<<<< import org.dbunit.dataset.IDataSet; ======= import org.apache.commons.lang.BooleanUtils; import org.junit.After; >>>>>>> import org.dbunit.dataset.IDataSet; import org.apache.commons.lang.BooleanUtils; import org.junit.After;
<<<<<<< if (includeRetired == true) { throw new APIException("ConceptDrug.retired.getting", (Object[]) null); ======= if (includeRetired) { throw new APIException("Getting retired drugs is no longer an options. Use the getAllDrugs() method for that"); >>>>>>> if (includeRetired) { throw new APIException("ConceptDrug.retired.getting", (Object[]) null); <<<<<<< if (includeRetired == true) { throw new APIException("ConceptDrug.retired.getting", (Object[]) null); ======= if (includeRetired) { throw new APIException("Getting retired drugs is no longer an options. Use the getAllDrugs() method for that"); >>>>>>> if (includeRetired) { throw new APIException("ConceptDrug.retired.getting", (Object[]) null);
<<<<<<< * * * ======= >>>>>>> * * * <<<<<<< * * * ======= >>>>>>> * * * <<<<<<< * @should create a reference term for a concept mapping on the fly when editing a concept * @should create a reference term for a concept mapping on the fly when creating a concept * @should add new concept name * @should not set audit info if the concept is not edited * @should set audit info if an item is removed from any of its child collections * @should set audit info if any item in the child collections is edited * @should set audit info if an item is added to any of its child collections * @should pass when saving a concept after removing a name * @should save a conceptNumeric with allowDecimal value ======= * @should create a reference term for a concept mapping on the fly when editing a concept * @should create a reference term for a concept mapping on the fly when creating a concept >>>>>>> * @should create a reference term for a concept mapping on the fly when editing a concept * @should create a reference term for a concept mapping on the fly when creating a concept * @should add new concept name * @should not set audit info if the concept is not edited * @should set audit info if an item is removed from any of its child collections * @should set audit info if any item in the child collections is edited * @should set audit info if an item is added to any of its child collections * @should pass when saving a concept after removing a name * @should save a conceptNumeric with allowDecimal value <<<<<<< * @should not return drugs that are retired * @should return drugs by drug id * @should return drugs by drug concept id * @should not fail if there is no drug by given id ======= * @should return drugs that are retired * @should return drugs by drug id * @should return drugs by drug concept id * @should not fail if there is no drug by given id >>>>>>> * @should not return drugs that are retired * @should return drugs by drug id * @should return drugs by drug concept id * @should not fail if there is no drug by given id <<<<<<< * @should return a search result whose concept name contains all word tokens * @should not return concepts with matching names that are voided ======= * @should return a search result whose concept name contains a word with more weight * @should return a search result whose concept name contains all word tokens * @should not return concepts with matching names that are voided >>>>>>> * @should return a search result whose concept name contains all word tokens * @should not return concepts with matching names that are voided <<<<<<< /** * Returns a list of concepts with the same name in the given locale. * <p> * This method is case insensitive. It searches for exactly matching names and close matching * locales (if exactLocale = false). It considers only non-voided names and all concepts. * * @param name * @param locale <code>null</code> = all locales * @param exactLocale <code>false</code> if search for both global and country specific, * <code>true</code> if <code>null</code> * @return the list of concepts * @throws APIException * @since 1.9, 1.8.4 * @should return concepts for all countries and global language given language only locale * @should return concepts for specific country and global language given language and country * locale */ @Authorized(PrivilegeConstants.GET_CONCEPTS) public List<Concept> getConceptsByName(String name, Locale locale, Boolean exactLocale) throws APIException; /** * Gets the concept map type to be used as the default. It is specified by the * <code>concept.defaultConceptMapType</code> global property. * * @since 1.9 * @return the {@link ConceptMapType} * @throws APIException * @should return same as by default * @should return type as set in gp */ @Authorized(PrivilegeConstants.VIEW_CONCEPT_MAP_TYPES) public ConceptMapType getDefaultConceptMapType() throws APIException; ======= /** * Returns a list of concepts with the same name in the given locale. * <p> * This method is case insensitive. It searches for exactly matching names and close matching * locales (if exactLocale = false). It considers only non-voided names and all concepts. * * @param name * @param locale <code>null</code> = all locales * @param exactLocale <code>false</code> if search for both global and country specific, * <code>true</code> if <code>null</code> * @return the list of concepts * @throws APIException * @since 1.9, 1.8.4 * @should return concepts for all countries and global language given language only locale * @should return concepts for specific country and global language given language and country * locale */ @Transactional(readOnly = true) @Authorized(PrivilegeConstants.VIEW_CONCEPTS) public List<Concept> getConceptsByName(String name, Locale locale, Boolean exactLocale) throws APIException; /** * Gets the concept map type to be used as the default. It is specified by the * <code>concept.defaultConceptMapType</code> global property. * * @since 1.9 * @return the {@link ConceptMapType} * @throws APIException * @should return same as by default * @should return type as set in gp */ @Transactional(readOnly = true) @Authorized(PrivilegeConstants.VIEW_CONCEPT_MAP_TYPES) public ConceptMapType getDefaultConceptMapType() throws APIException; /** * Fetches un retired drugs that match the specified search phrase. The logic matches on drug * names, concept names of the associated concepts or the concept reference term codes of the * drug reference term mappings * * @param searchPhrase The string to match against * @param locale The locale to match against when searching in drug concept names * @param exactLocale If false then concepts with names in a broader locale will be matched e.g * in case en_GB is passed in then en will be matched * @param includeRetired Specifies if retired drugs that match should be included or not * @return A list of matching drugs * @since 1.10 * @should get drugs with names matching the search phrase * @should include retired drugs if includeRetired is set to true * @should get drugs linked to concepts with names that match the phrase * @should get drugs linked to concepts with names that match the phrase and locale * @should get drugs linked to concepts with names that match the phrase and related locales * @should get drugs that have mappings with reference term codes that match the phrase * @should return unique drugs * @should return all drugs with a matching term code or drug name or concept name * @should reject a null search phrase */ @Authorized(PrivilegeConstants.VIEW_CONCEPTS) public List<Drug> getDrugs(String searchPhrase, Locale locale, boolean exactLocale, boolean includeRetired); /** * Fetches all drugs with reference mappings to the specified concept source that match the * specified code and concept map types * * @param code the code the reference term code to match on * @param conceptSource the concept source on which to match on * @param withAnyOfTheseTypes the ConceptMapTypes to match on * @param includeRetired specifies if retired drugs should be included or not * @since 1.10 * @return the list of {@link Drug} * @throws APIException * @should get a list of all drugs that match on all the parameter values * @should return retired and non-retired drugs if includeRetired is set to true * @should return empty list if no matches are found * @should match on the code * @should match on the concept source * @should match on the map types * @should fail if no code and concept source and withAnyOfTheseTypes are provided * @should exclude duplicate matches * @should fail if source is null */ @Transactional(readOnly = true) @Authorized(PrivilegeConstants.VIEW_CONCEPTS) public List<Drug> getDrugsByMapping(String code, ConceptSource conceptSource, Collection<ConceptMapType> withAnyOfTheseTypes, boolean includeRetired) throws APIException; /** * Gets the "best" matching drug, i.e. matching the earliest ConceptMapType passed in e.g. * getDrugByMapping("12345", rxNorm, Arrays.asList(sameAs, narrowerThan)) If there are multiple * matches for the highest-priority ConceptMapType, throw an exception * * * @param code the code the reference term code to match on * @param conceptSource the concept source to match on * @param withAnyOfTheseTypesOrOrderOfPreference the ConceptMapTypes to match on * @since 1.10 * @return the {@link Drug} * @throws APIException * @should return a drug that matches the code and source * @should return a drug that matches the code and source and the best map type * @should fail if multiple drugs are found matching the best map type * @should return null if no match found * @should fail if no code and concept source and withAnyOfTheseTypes are provided * @should fail if source is null */ @Transactional(readOnly = true) @Authorized(PrivilegeConstants.VIEW_CONCEPTS) public Drug getDrugByMapping(String code, ConceptSource conceptSource, Collection<ConceptMapType> withAnyOfTheseTypesOrOrderOfPreference) throws APIException; >>>>>>> /** * Returns a list of concepts with the same name in the given locale. * <p> * This method is case insensitive. It searches for exactly matching names and close matching * locales (if exactLocale = false). It considers only non-voided names and all concepts. * * @param name * @param locale <code>null</code> = all locales * @param exactLocale <code>false</code> if search for both global and country specific, * <code>true</code> if <code>null</code> * @return the list of concepts * @throws APIException * @since 1.9, 1.8.4 * @should return concepts for all countries and global language given language only locale * @should return concepts for specific country and global language given language and country * locale */ @Authorized(PrivilegeConstants.GET_CONCEPTS) public List<Concept> getConceptsByName(String name, Locale locale, Boolean exactLocale) throws APIException; /** * Gets the concept map type to be used as the default. It is specified by the * <code>concept.defaultConceptMapType</code> global property. * * @since 1.9 * @return the {@link ConceptMapType} * @throws APIException * @should return same as by default * @should return type as set in gp */ @Authorized(PrivilegeConstants.VIEW_CONCEPT_MAP_TYPES) public ConceptMapType getDefaultConceptMapType() throws APIException; /** * Fetches un retired drugs that match the specified search phrase. The logic matches on drug * names, concept names of the associated concepts or the concept reference term codes of the * drug reference term mappings * * @param searchPhrase The string to match against * @param locale The locale to match against when searching in drug concept names * @param exactLocale If false then concepts with names in a broader locale will be matched e.g * in case en_GB is passed in then en will be matched * @param includeRetired Specifies if retired drugs that match should be included or not * @return A list of matching drugs * @since 1.10 * @should get drugs with names matching the search phrase * @should include retired drugs if includeRetired is set to true * @should get drugs linked to concepts with names that match the phrase * @should get drugs linked to concepts with names that match the phrase and locale * @should get drugs linked to concepts with names that match the phrase and related locales * @should get drugs that have mappings with reference term codes that match the phrase * @should return unique drugs * @should return all drugs with a matching term code or drug name or concept name * @should reject a null search phrase */ @Authorized(PrivilegeConstants.GET_CONCEPTS) public List<Drug> getDrugs(String searchPhrase, Locale locale, boolean exactLocale, boolean includeRetired); /** * Fetches all drugs with reference mappings to the specified concept source that match the * specified code and concept map types * * @param code the code the reference term code to match on * @param conceptSource the concept source on which to match on * @param withAnyOfTheseTypes the ConceptMapTypes to match on * @param includeRetired specifies if retired drugs should be included or not * @since 1.10 * @return the list of {@link Drug} * @throws APIException * @should get a list of all drugs that match on all the parameter values * @should return retired and non-retired drugs if includeRetired is set to true * @should return empty list if no matches are found * @should match on the code * @should match on the concept source * @should match on the map types * @should fail if no code and concept source and withAnyOfTheseTypes are provided * @should exclude duplicate matches * @should fail if source is null */ @Authorized(PrivilegeConstants.GET_CONCEPTS) public List<Drug> getDrugsByMapping(String code, ConceptSource conceptSource, Collection<ConceptMapType> withAnyOfTheseTypes, boolean includeRetired) throws APIException; /** * Gets the "best" matching drug, i.e. matching the earliest ConceptMapType passed in e.g. * getDrugByMapping("12345", rxNorm, Arrays.asList(sameAs, narrowerThan)) If there are multiple * matches for the highest-priority ConceptMapType, throw an exception * * * @param code the code the reference term code to match on * @param conceptSource the concept source to match on * @param withAnyOfTheseTypesOrOrderOfPreference the ConceptMapTypes to match on * @since 1.10 * @return the {@link Drug} * @throws APIException * @should return a drug that matches the code and source * @should return a drug that matches the code and source and the best map type * @should fail if multiple drugs are found matching the best map type * @should return null if no match found * @should fail if no code and concept source and withAnyOfTheseTypes are provided * @should fail if source is null */ @Authorized(PrivilegeConstants.GET_CONCEPTS) public Drug getDrugByMapping(String code, ConceptSource conceptSource, Collection<ConceptMapType> withAnyOfTheseTypesOrOrderOfPreference) throws APIException;
<<<<<<< import org.apache.commons.lang3.StringUtils; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.hibernate.search.annotations.DocumentId; import org.hibernate.search.annotations.Indexed; ======= import org.apache.commons.lang.StringUtils; import org.openmrs.api.context.Context; >>>>>>> import org.apache.commons.lang3.StringUtils; import org.hibernate.search.annotations.DocumentId; import org.hibernate.search.annotations.Indexed; import org.openmrs.api.context.Context; <<<<<<< @Indexed public class Drug extends BaseOpenmrsMetadata implements java.io.Serializable, Orderable<DrugOrder> { ======= public class Drug extends BaseOpenmrsMetadata implements java.io.Serializable { >>>>>>> @Indexed public class Drug extends BaseOpenmrsMetadata implements java.io.Serializable {
<<<<<<< ======= private String membersIDs = Consts.EMPTY_STRING; private List<QBDialog> chatsDialogsList; >>>>>>> private List<QBDialog> chatsDialogsList; <<<<<<< ======= @Override public void processMessage(QBChat chat, QBChatMessage chatMessage) { Intent intent = new Intent(QBServiceConsts.GOT_CHAT_MESSAGE); String messageBody = getMessageBody(chatMessage); String extraChatMessage; Friend friend = DatabaseManager.getFriendById(context, chatMessage.getSenderId()); String fullname = friend.getFullname(); if (TextUtils.isEmpty(messageBody)) { extraChatMessage = context.getResources().getString(R.string.file_was_attached); } else { extraChatMessage = messageBody; } intent.putExtra(QBServiceConsts.EXTRA_CHAT_MESSAGE, extraChatMessage); intent.putExtra(QBServiceConsts.EXTRA_SENDER_CHAT_MESSAGE, fullname); LocalBroadcastManager.getInstance(context).sendBroadcast(intent); String attachURL; if (TextUtils.isEmpty(messageBody)) { attachURL = getAttachUrlFromQBChatMessage(chatMessage); } else { attachURL = Consts.EMPTY_STRING; } if (chat instanceof QBRoomChat) { saveMessageToCache(new PrivateChatMessageCache(messageBody, chatMessage.getSenderId(), ((QBRoomChat) chat).getName(), null, null, membersIDs)); } else { saveMessageToCache(new PrivateChatMessageCache(messageBody, chatMessage.getSenderId(), String.valueOf(friend.getId()), attachURL, fullname, null)); } updateLoadedChatDialog(chatMessage.getSenderId(), extraChatMessage); } >>>>>>> <<<<<<< private void notifyMessageReceived(QBChatMessage chatMessage, Friend friend) { Intent intent = new Intent(QBServiceConsts.GOT_CHAT_MESSAGE); String messageBody = getMessageBody(chatMessage); String extraChatMessage = ""; String fullname = friend.getFullname(); if (TextUtils.isEmpty(messageBody)) { extraChatMessage = context.getResources().getString(R.string.file_was_attached); } else { extraChatMessage = messageBody; } intent.putExtra(QBServiceConsts.EXTRA_CHAT_MESSAGE, extraChatMessage); intent.putExtra(QBServiceConsts.EXTRA_SENDER_CHAT_MESSAGE, fullname); LocalBroadcastManager.getInstance(context).sendBroadcast(intent); } private String getAttachUrlIfExists(QBChatMessage chatMessage) { String attachURL = Consts.EMPTY_STRING; if (TextUtils.isEmpty(chatMessage.getBody())) { attachURL = getAttachUrlFromQBChatMessage(chatMessage); } return attachURL; } private class PrivateChatMessageListener implements QBMessageListener<QBPrivateChat> { @Override public void processMessage(QBPrivateChat privateChat, QBChatMessage chatMessage) { Friend friend = DatabaseManager.getFriendById(context, chatMessage.getSenderId()); String attachURL = getAttachUrlIfExists(chatMessage); saveMessageToCache(new ChatMessageCache(chatMessage.getBody(), chatMessage.getSenderId(), friend.getId(), attachURL)); notifyMessageReceived(chatMessage, friend); } } private class RoomChatMessageListener implements QBMessageListener<QBRoomChat> { @Override public void processMessage(QBRoomChat roomChat, QBChatMessage chatMessage) { saveMessageToCache(new ChatMessageCache(chatMessage.getBody(), chatMessage.getSenderId(), roomChat.getJid(), null)); } } public List<QBDialog> getChatDialogs() { ======= public List<QBDialog> getChatsDialogs() throws QBResponseException { >>>>>>> private void notifyMessageReceived(QBChatMessage chatMessage, Friend friend) { Intent intent = new Intent(QBServiceConsts.GOT_CHAT_MESSAGE); String messageBody = getMessageBody(chatMessage); String extraChatMessage = ""; String fullname = friend.getFullname(); if (TextUtils.isEmpty(messageBody)) { extraChatMessage = context.getResources().getString(R.string.file_was_attached); } else { extraChatMessage = messageBody; } intent.putExtra(QBServiceConsts.EXTRA_CHAT_MESSAGE, extraChatMessage); intent.putExtra(QBServiceConsts.EXTRA_SENDER_CHAT_MESSAGE, fullname); LocalBroadcastManager.getInstance(context).sendBroadcast(intent); } private String getAttachUrlIfExists(QBChatMessage chatMessage) { String attachURL = Consts.EMPTY_STRING; if (TextUtils.isEmpty(chatMessage.getBody())) { attachURL = getAttachUrlFromQBChatMessage(chatMessage); } return attachURL; } private class PrivateChatMessageListener implements QBMessageListener<QBPrivateChat> { @Override public void processMessage(QBPrivateChat privateChat, QBChatMessage chatMessage) { Friend friend = DatabaseManager.getFriendById(context, chatMessage.getSenderId()); String attachURL = getAttachUrlIfExists(chatMessage); saveMessageToCache(new ChatMessageCache(chatMessage.getBody(), chatMessage.getSenderId(), friend.getId(), attachURL)); notifyMessageReceived(chatMessage, friend); } } private class RoomChatMessageListener implements QBMessageListener<QBRoomChat> { @Override public void processMessage(QBRoomChat roomChat, QBChatMessage chatMessage) { saveMessageToCache(new ChatMessageCache(chatMessage.getBody(), chatMessage.getSenderId(), roomChat.getJid(), null)); } } public List<QBDialog> getChatsDialogs() throws QBResponseException {
<<<<<<< if (Context.hasPrivilege(PrivilegeConstants.VIEW_ORDERS)) { List<DrugOrder> drugOrderList = Context.getOrderService().getDrugOrdersByPatient(p); model.put("patientDrugOrders", drugOrderList); List<DrugOrder> currentDrugOrders = new ArrayList<DrugOrder>(); List<DrugOrder> discontinuedDrugOrders = new ArrayList<DrugOrder>(); Date rightNow = new Date(); for (Iterator<DrugOrder> iter = drugOrderList.iterator(); iter.hasNext();) { DrugOrder next = iter.next(); if (next.isCurrent() || next.isFuture()) { currentDrugOrders.add(next); } if (next.isDiscontinued(rightNow)) { discontinuedDrugOrders.add(next); } } model.put("currentDrugOrders", currentDrugOrders); model.put("completedDrugOrders", discontinuedDrugOrders); List<RegimenSuggestion> standardRegimens = Context.getOrderService().getStandardRegimens(); if (standardRegimens != null) { model.put("standardRegimens", standardRegimens); } } ======= >>>>>>> <<<<<<< Person p = (Person) model.get("person"); if (p == null) { p = (Person) model.get("patient"); if (p == null) { ======= Person p = (Person) model.get("person"); if (p == null) { p = (Person) model.get("patient"); if (p == null) >>>>>>> Person p = (Person) model.get("person"); if (p == null) { p = (Person) model.get("patient"); if (p == null) {
<<<<<<< import org.python.constantine.platform.Errno; ======= import java.io.InputStream; import java.io.OutputStream; import org.python.constantine.platform.Errno; >>>>>>> import org.python.constantine.platform.Errno; import java.io.InputStream; import java.io.OutputStream;
<<<<<<< public static String __doc__ = "Python's standard exception class hierarchy.\n" + "\n" + "Exceptions found here are defined both in the exceptions module and the\n" + "built-in namespace. It is recommended that user-defined exceptions\n" + "inherit from Exception. See the documentation for the exception\n" + "inheritance hierarchy.\n"; private exceptions() { ; } ======= public static String __doc__ = "Exceptions found here are defined both in the exceptions module and the " + "built-in namespace. It is recommended that user-defined exceptions " + "inherit from Exception. See the documentation for the exception " + "inheritance hierarchy."; >>>>>>> public static String __doc__ = "Python's standard exception class hierarchy.\n" + "\n" + "Exceptions found here are defined both in the exceptions module and the\n" + "built-in namespace. It is recommended that user-defined exceptions\n" + "inherit from Exception. See the documentation for the exception\n" + "inheritance hierarchy.\n"; <<<<<<< buildClass(dict, "KeyError", "LookupError", "KeyError", "Mapping key not found."); ======= buildClass(dict, "IndexError", "LookupError", "Sequence index out of range."); >>>>>>> buildClass(dict, "IndexError", "LookupError", "Sequence index out of range."); <<<<<<< buildClass(dict, "OverflowWarning", "Warning", "empty__init__", "Base class for warnings about numeric overflow."); buildClass(dict, "FutureWarning", "Warning", "empty__init__", "Base class for warnings about constructs that will change semantically in the future."); buildClass(dict, "ImportWarning", "Warning", "empty__init__", "Base class for warnings about probable mistakes in module imports."); ======= // XXX: remove when CPythonLib 2.5 hits buildClass(dict, "OverflowWarning", "Warning", "Base class for warnings about numeric overflow."); buildClass(dict, "FutureWarning", "Warning", "Base class for warnings about constructs that will change semantically\n" + "in the future."); buildClass(dict, "ImportWarning", "Warning", "Base class for warnings about probable mistakes in module imports"); buildClass(dict, "UnicodeWarning", "Warning", "Base class for warnings about Unicode related problems, mostly\n" + "related to conversion problems."); >>>>>>> // XXX: remove when CPythonLib 2.5 hits buildClass(dict, "OverflowWarning", "Warning", "Base class for warnings about numeric overflow."); buildClass(dict, "FutureWarning", "Warning", "Base class for warnings about constructs that will change semantically\n" + "in the future."); buildClass(dict, "ImportWarning", "Warning", "Base class for warnings about probable mistakes in module imports"); buildClass(dict, "UnicodeWarning", "Warning", "Base class for warnings about Unicode related problems, mostly\n" + "related to conversion problems."); <<<<<<< public static void Exception__init__(PyObject[] arg, String[] kws) { ArgParser ap = new ArgParser("__init__", arg, kws, "self", "args"); PyObject self = ap.getPyObject(0); PyObject args = ap.getList(1); self.__setattr__("args", args); ======= if (args.length >= 1) { self.__setattr__("msg", args[0]); } if (args.length == 2) { PyObject[] info = Py.make_array(args[1]); if (info.length != 4) { throw Py.IndexError("tuple index out of range"); } self.__setattr__("filename", info[0]); self.__setattr__("lineno", info[1]); self.__setattr__("offset", info[2]); self.__setattr__("text", info[3]); } >>>>>>> if (args.length >= 1) { self.__setattr__("msg", args[0]); } if (args.length == 2) { PyObject[] info = Py.make_array(args[1]); if (info.length != 4) { throw Py.IndexError("tuple index out of range"); } self.__setattr__("filename", info[0]); self.__setattr__("lineno", info[1]); self.__setattr__("offset", info[2]); self.__setattr__("text", info[3]); } <<<<<<< public static PyObject KeyError__str__(PyObject[] arg, String[] kws) { ArgParser ap = new ArgParser("__str__", arg, kws, "self"); PyObject self = ap.getPyObject(0); PyObject args = self.__getattr__("args"); // If args is a tuple of exactly one item, apply repr to args[0]. // This is done so that e.g. the exception raised by {}[''] prints // KeyError: '' // rather than the confusing // KeyError // alone. The downside is that if KeyError is raised with an explanatory // string, that string will be displayed in quotes. Too bad. if (args.__len__() == 1) { return args.__getitem__(0).__repr__(); } else { return Exception__str__(arg, kws); } } public static PyObject KeyError(PyObject[] arg, String[] kws) { PyObject dict = empty__init__(arg, kws); dict.__setitem__("__str__", getJavaFunc("KeyError__str__")); return dict; } private static PyObject getJavaFunc(String name) { return Py.newJavaFunc(exceptions.class, name); ======= /** * Determine the start position for UnicodeErrors. * * @param self a UnicodeError value * @param unicode whether the UnicodeError object should be * unicode * @return an the start position */ public static int getStart(PyObject self, boolean unicode) { int start = getInt(self.__getattr__("start"), "start"); PyObject object; if (unicode) { object = getUnicode(self.__getattr__("object"), "object"); } else { object = getString(self.__getattr__("object"), "object"); } if (start < 0) { start = 0; } if (start >= object.__len__()) { start = object.__len__() - 1; } return start; >>>>>>> /** * Determine the start position for UnicodeErrors. * * @param self a UnicodeError value * @param unicode whether the UnicodeError object should be * unicode * @return an the start position */ public static int getStart(PyObject self, boolean unicode) { int start = getInt(self.__getattr__("start"), "start"); PyObject object; if (unicode) { object = getUnicode(self.__getattr__("object"), "object"); } else { object = getString(self.__getattr__("object"), "object"); } if (start < 0) { start = 0; } if (start >= object.__len__()) { start = object.__len__() - 1; } return start;
<<<<<<< ======= import com.quickblox.q_municate_db.models.Dialog; import com.quickblox.q_municate_db.models.DialogNotification; >>>>>>> import com.quickblox.q_municate_db.models.Dialog; <<<<<<< ======= import com.quickblox.q_municate_db.models.Message; import com.quickblox.q_municate_db.utils.ErrorUtils; >>>>>>> import com.quickblox.q_municate_db.models.Message; <<<<<<< public void onStop(){ super.onStop(); dialogListFragmentListener.removeLoadChatsSuccessActionCallback(this); } @Override ======= public void onStop() { super.onStop(); deleteObservers(); } @Override >>>>>>> public void onStop(){ super.onStop(); dialogListFragmentListener.removeLoadChatsSuccessActionCallback(this); deleteObservers(); } @Override <<<<<<< private void updateDialogsList(int startRow, int perPage) { if(!loaderConsumerQueue.isEmpty()){ Log.d(TAG, "updateDialogsList loaderConsumerQueue.add"); loaderConsumerQueue.offer(new LoaderConsumer(startRow, perPage)); return; } if(dialogsListLoader.isLoading) { Log.d(TAG, "updateDialogsList dialogsListLoader.isLoading"); loaderConsumerQueue.offer(new LoaderConsumer(startRow, perPage)); } else { Log.d(TAG, "updateDialogsList onChangedData"); dialogsListLoader.setPagination(startRow, perPage); onChangedData(); } } private void updateDialogsListFromQueue() { if(!loaderConsumerQueue.isEmpty()) { LoaderConsumer consumer = loaderConsumerQueue.poll(); handler.post(consumer); } } private class LoaderConsumer implements Runnable { int startRow; int perPage; LoaderConsumer(int startRow, int perPage) { this.startRow = startRow; this.perPage = perPage; } @Override public void run() { Log.d(TAG, "LoaderConsumer onChangedData"); dialogsListLoader.setPagination(startRow, perPage); onChangedData(); } ======= private void updateDialogsList() { Log.i(TAG, "updateDialogsList ="); onChangedData(); >>>>>>> private void updateDialogsList(int startRow, int perPage) { if(!loaderConsumerQueue.isEmpty()){ Log.d(TAG, "updateDialogsList loaderConsumerQueue.add"); loaderConsumerQueue.offer(new LoaderConsumer(startRow, perPage)); return; } if(dialogsListLoader.isLoading) { Log.d(TAG, "updateDialogsList dialogsListLoader.isLoading"); loaderConsumerQueue.offer(new LoaderConsumer(startRow, perPage)); } else { Log.d(TAG, "updateDialogsList onChangedData"); dialogsListLoader.setPagination(startRow, perPage); onChangedData(); } } private void updateDialogsListFromQueue() { if(!loaderConsumerQueue.isEmpty()) { LoaderConsumer consumer = loaderConsumerQueue.poll(); handler.post(consumer); } } private class LoaderConsumer implements Runnable { int startRow; int perPage; LoaderConsumer(int startRow, int perPage) { this.startRow = startRow; this.perPage = perPage; } @Override public void run() { Log.d(TAG, "LoaderConsumer onChangedData"); dialogsListLoader.setPagination(startRow, perPage); onChangedData(); } <<<<<<< if (observeKey.equals(dataManager.getQBChatDialogDataManager().getObserverKey())) // || observeKey.equals(dataManager.getMessageDataManager().getObserverKey()) // || observeKey.equals(dataManager.getDialogOccupantDataManager().getObserverKey())) { Log.d(TAG, "CommonObserver update observeKey= " + observeKey); // updateDialogsList(); ======= Log.i(TAG, "CommonObserver update, key="+observeKey); if (observeKey.equals(dataManager.getMessageDataManager().getObserverKey()) && (((Bundle) data).getSerializable(BaseManager.EXTRA_OBJECT) instanceof Message)){ Message message = getObjFromBundle((Bundle) data); if (message.getDialogOccupant() != null && message.getDialogOccupant().getDialog() != null) { updateDialog(message.getDialogOccupant().getDialog().getDialogId()); } } else if (observeKey.equals(dataManager.getQBChatDialogDataManager().getObserverKey())) { Dialog dialog = getObjFromBundle((Bundle) data); if (dialog != null) { updateDialog(dialog.getDialogId()); } } else if (observeKey.equals(dataManager.getDialogOccupantDataManager().getObserverKey())) { DialogOccupant dialogOccupant = getObjFromBundle((Bundle) data); if (dialogOccupant != null && dialogOccupant.getDialog() != null) { updateDialog(dialogOccupant.getDialog().getDialogId()); } >>>>>>> Log.i(TAG, "CommonObserver update, key="+observeKey); if (observeKey.equals(dataManager.getMessageDataManager().getObserverKey()) && (((Bundle) data).getSerializable(BaseManager.EXTRA_OBJECT) instanceof Message)){ Message message = getObjFromBundle((Bundle) data); if (message.getDialogOccupant() != null && message.getDialogOccupant().getDialog() != null) { updateDialog(message.getDialogOccupant().getDialog().getDialogId()); } } else if (observeKey.equals(dataManager.getQBChatDialogDataManager().getObserverKey())) { Dialog dialog = getObjFromBundle((Bundle) data); if (dialog != null) { updateDialog(dialog.getDialogId()); } } else if (observeKey.equals(dataManager.getDialogOccupantDataManager().getObserverKey())) { DialogOccupant dialogOccupant = getObjFromBundle((Bundle) data); if (dialogOccupant != null && dialogOccupant.getDialog() != null) { updateDialog(dialogOccupant.getDialog().getDialogId()); }
<<<<<<< public static final String SEND_PUSH_ACTION = "send_push_action"; ======= public static final String UPDATE_STATUS_MESSAGE_ACTION = "update_status_message_action"; >>>>>>> public static final String UPDATE_STATUS_MESSAGE_ACTION = "update_status_message_action"; public static final String SEND_PUSH_ACTION = "send_push_action"; <<<<<<< public static final String SEND_PUSH_MESSAGES_SUCCESS_ACTION = "send_push_message_success_action"; public static final String SEND_PUSH_MESSAGES_FAIL_ACTION = "send_push_message_fail_action"; ======= public static final String UPDATE_STATUS_MESSAGE_SUCCESS_ACTION = "update_status_message_success_action"; public static final String UPDATE_STATUS_MESSAGE_FAIL_ACTION = "update_status_message_fail_action"; >>>>>>> public static final String UPDATE_STATUS_MESSAGE_SUCCESS_ACTION = "update_status_message_success_action"; public static final String UPDATE_STATUS_MESSAGE_FAIL_ACTION = "update_status_message_fail_action"; public static final String SEND_PUSH_MESSAGES_SUCCESS_ACTION = "send_push_message_success_action"; public static final String SEND_PUSH_MESSAGES_FAIL_ACTION = "send_push_message_fail_action";
<<<<<<< public static String __doc__ = "Python's standard exception class hierarchy.\n" + "\n" + "Exceptions found here are defined both in the exceptions module and the\n" + "built-in namespace. It is recommended that user-defined exceptions\n" + "inherit from Exception. See the documentation for the exception\n" + "inheritance hierarchy.\n"; private exceptions() { ; } ======= public static String __doc__ = "Exceptions found here are defined both in the exceptions module and the " + "built-in namespace. It is recommended that user-defined exceptions " + "inherit from Exception. See the documentation for the exception " + "inheritance hierarchy."; >>>>>>> public static String __doc__ = "Python's standard exception class hierarchy.\n" + "\n" + "Exceptions found here are defined both in the exceptions module and the\n" + "built-in namespace. It is recommended that user-defined exceptions\n" + "inherit from Exception. See the documentation for the exception\n" + "inheritance hierarchy.\n"; <<<<<<< buildClass(dict, "KeyError", "LookupError", "KeyError", "Mapping key not found."); ======= buildClass(dict, "IndexError", "LookupError", "Sequence index out of range."); >>>>>>> buildClass(dict, "IndexError", "LookupError", "Sequence index out of range."); <<<<<<< buildClass(dict, "OverflowWarning", "Warning", "empty__init__", "Base class for warnings about numeric overflow."); buildClass(dict, "FutureWarning", "Warning", "empty__init__", "Base class for warnings about constructs that will change semantically in the future."); buildClass(dict, "ImportWarning", "Warning", "empty__init__", "Base class for warnings about probable mistakes in module imports."); ======= // XXX: remove when CPythonLib 2.5 hits buildClass(dict, "OverflowWarning", "Warning", "Base class for warnings about numeric overflow."); buildClass(dict, "FutureWarning", "Warning", "Base class for warnings about constructs that will change semantically\n" + "in the future."); buildClass(dict, "ImportWarning", "Warning", "Base class for warnings about probable mistakes in module imports"); buildClass(dict, "UnicodeWarning", "Warning", "Base class for warnings about Unicode related problems, mostly\n" + "related to conversion problems."); >>>>>>> // XXX: remove when CPythonLib 2.5 hits buildClass(dict, "OverflowWarning", "Warning", "Base class for warnings about numeric overflow."); buildClass(dict, "FutureWarning", "Warning", "Base class for warnings about constructs that will change semantically\n" + "in the future."); buildClass(dict, "ImportWarning", "Warning", "Base class for warnings about probable mistakes in module imports"); buildClass(dict, "UnicodeWarning", "Warning", "Base class for warnings about Unicode related problems, mostly\n" + "related to conversion problems."); <<<<<<< public static void Exception__init__(PyObject[] arg, String[] kws) { ArgParser ap = new ArgParser("__init__", arg, kws, "self", "args"); PyObject self = ap.getPyObject(0); PyObject args = ap.getList(1); self.__setattr__("args", args); ======= if (args.length >= 1) { self.__setattr__("msg", args[0]); } if (args.length == 2) { PyObject[] info = Py.make_array(args[1]); if (info.length != 4) { throw Py.IndexError("tuple index out of range"); } self.__setattr__("filename", info[0]); self.__setattr__("lineno", info[1]); self.__setattr__("offset", info[2]); self.__setattr__("text", info[3]); } >>>>>>> if (args.length >= 1) { self.__setattr__("msg", args[0]); } if (args.length == 2) { PyObject[] info = Py.make_array(args[1]); if (info.length != 4) { throw Py.IndexError("tuple index out of range"); } self.__setattr__("filename", info[0]); self.__setattr__("lineno", info[1]); self.__setattr__("offset", info[2]); self.__setattr__("text", info[3]); } <<<<<<< public static PyObject KeyError__str__(PyObject[] arg, String[] kws) { ArgParser ap = new ArgParser("__str__", arg, kws, "self"); PyObject self = ap.getPyObject(0); PyObject args = self.__getattr__("args"); // If args is a tuple of exactly one item, apply repr to args[0]. // This is done so that e.g. the exception raised by {}[''] prints // KeyError: '' // rather than the confusing // KeyError // alone. The downside is that if KeyError is raised with an explanatory // string, that string will be displayed in quotes. Too bad. if (args.__len__() == 1) { return args.__getitem__(0).__repr__(); } else { return Exception__str__(arg, kws); } } public static PyObject KeyError(PyObject[] arg, String[] kws) { PyObject dict = empty__init__(arg, kws); dict.__setitem__("__str__", getJavaFunc("KeyError__str__")); return dict; } private static PyObject getJavaFunc(String name) { return Py.newJavaFunc(exceptions.class, name); ======= /** * Determine the start position for UnicodeErrors. * * @param self a UnicodeError value * @param unicode whether the UnicodeError object should be * unicode * @return an the start position */ public static int getStart(PyObject self, boolean unicode) { int start = getInt(self.__getattr__("start"), "start"); PyObject object; if (unicode) { object = getUnicode(self.__getattr__("object"), "object"); } else { object = getString(self.__getattr__("object"), "object"); } if (start < 0) { start = 0; } if (start >= object.__len__()) { start = object.__len__() - 1; } return start; >>>>>>> /** * Determine the start position for UnicodeErrors. * * @param self a UnicodeError value * @param unicode whether the UnicodeError object should be * unicode * @return an the start position */ public static int getStart(PyObject self, boolean unicode) { int start = getInt(self.__getattr__("start"), "start"); PyObject object; if (unicode) { object = getUnicode(self.__getattr__("object"), "object"); } else { object = getString(self.__getattr__("object"), "object"); } if (start < 0) { start = 0; } if (start >= object.__len__()) { start = object.__len__() - 1; } return start;
<<<<<<< /* * Copyright (C) 2012-2019 52°North Initiative for Geospatial Open Source ======= /** * Copyright (C) 2012-2020 52°North Initiative for Geospatial Open Source >>>>>>> /* * Copyright (C) 2012-2020 52°North Initiative for Geospatial Open Source
<<<<<<< import java.util.ArrayList; import java.util.Collection; import java.util.List; ======= import java.util.regex.Matcher; import java.util.regex.Pattern; >>>>>>> import java.util.ArrayList; import java.util.Collection; import java.util.regex.Matcher; import java.util.regex.Pattern; import java.util.List;
<<<<<<< public static final String FRIENDS_LOAD_ACTION = "friends_load_action"; public static final String USER_SEARCH_ACTION = "user_search_action"; public static final String SEND_MESSAGE_ACTION = "send_message_action"; public static final String LOAD_ATTACH_FILE_ACTION = "load_attach_file_action"; ======= public static final String FRIENDS_LOAD_ACTION = "friends load action"; public static final String USER_SEARCH_ACTION = "user search action"; public static final String SEND_MESSAGE_ACTION = "send message action"; public static final String SEND_GROUP_MESSAGE_ACTION = "send group message action"; >>>>>>> public static final String FRIENDS_LOAD_ACTION = "friends load action"; public static final String USER_SEARCH_ACTION = "user search action"; public static final String SEND_MESSAGE_ACTION = "send message action"; public static final String SEND_GROUP_MESSAGE_ACTION = "send group message action"; public static final String LOAD_ATTACH_FILE_ACTION = "load_attach_file_action";
<<<<<<< import java.util.Date; ======= import java.math.BigDecimal; >>>>>>> import java.util.Date; import java.math.BigDecimal; <<<<<<< public Hash getAddressHash() { return addressHash; } public int getIndexInTransactionsChain() { return indexInTransactionsChain; } public Date getCreateTime() { return createTime; } public BaseTransactionData(String addressHashInput, double amount){ ======= public BaseTransactionData(String addressHashInput, BigDecimal amount){ >>>>>>> public Hash getAddressHash() { return addressHash; } public int getIndexInTransactionsChain() { return indexInTransactionsChain; } public Date getCreateTime() { return createTime; } public BaseTransactionData(String addressHashInput, BigDecimal amount){
<<<<<<< /** * Document info * <p> * - file location for attachments or attribute name for hotlinks */ private String info; /** * Document configuration */ private String config; public LinkInfo(String infoStr) { fromString(infoStr); } public LinkInfo(String label, String info, Type type) { ======= public static final String DELIMITER = "~"; //$NON-NLS-1$ public LinkInfo(String attachmentInfo) { final String[] defValues = attachmentInfo.split(DELIMITER); info = getCleanValue(defValues[0]); type = Type.valueOf(defValues[1]); if (defValues.length > 2) { label = getCleanValue(defValues[2]); } else { label = null; } if (defValues.length > 3) { description = getCleanValue(defValues[3]); } else { description = null; } } public LinkInfo(String label, String info, IDocument.Type type) { >>>>>>> /** * Document configuration */ private String config; public static final String DELIMITER = "~"; //$NON-NLS-1$ public LinkInfo(String attachmentInfo) { fromString(attachmentInfo); } public LinkInfo(String label, String info, IDocument.Type type) { <<<<<<< public LinkInfo(String label, String description, String info, Type type, String config) { this.label = label; this.description = description; this.info = info; this.type = type; this.config = config; } ======= >>>>>>> public LinkInfo(String label, String description, String info, Type type, String config) { this.label = label; this.description = description; this.info = info; this.type = type; this.config = config; }
<<<<<<< public static void deleteFriends(Context context, List<Friend> friends) { for (Friend friend : friends) { deleteFriend(context, friend); } } public static void deleteFriend(Context context, Friend friend) { String where = FriendTable.Cols.ID + " = " + friend.getId(); context.getContentResolver().delete(FriendTable.CONTENT_URI, where, null); } //--------------------------------------- PrivateChatMessagesTable ----------------------------------------------------- // TODO SF context, message, senderId, chatId, attachUrl --- to Model public static void savePrivateChatMessage(Context context, String message, int senderId, int chatId, String attachUrl) { ======= public static void savePrivateChatMessage(Context context, PrivateChatMessageCache privateChatMessageCache) { >>>>>>> public static void deleteFriends(Context context, List<Friend> friends) { for (Friend friend : friends) { deleteFriend(context, friend); } } public static void deleteFriend(Context context, Friend friend) { String where = FriendTable.Cols.ID + " = " + friend.getId(); context.getContentResolver().delete(FriendTable.CONTENT_URI, where, null); } public static void savePrivateChatMessage(Context context, PrivateChatMessageCache privateChatMessageCache) {
<<<<<<< ======= void setGeoResourceInternal(IGeoResource geoResource) { this.geoResource = geoResource; this.resourceSelectionProvider.setSelection( geoResource ); } >>>>>>> void setGeoResourceInternal(IGeoResource geoResource) { this.geoResource = geoResource; this.resourceSelectionProvider.setSelection( geoResource ); }
<<<<<<< public static String DocumentDialog_actionLabel; public static String DocumentDialog_addAttachHeader; public static String DocumentDialog_attachSubHeader; public static String DocumentDialog_attachSubHeaderFeature; public static String DocumentDialog_attachSubHeaderShapefile; public static String DocumentDialog_attributeLabel; public static String DocumentDialog_descriptionLabel; public static String DocumentDialog_documentLabel; public static String DocumentDialog_editAttachHeader; public static String DocumentDialog_errValidFile; public static String DocumentDialog_errValidURL; public static String DocumentDialog_fileBtn; public static String DocumentDialog_fileLabel; public static String DocumentDialog_goBtn; public static String DocumentDialog_hotlinkHeader; public static String DocumentDialog_labelLabel; public static String DocumentDialog_newBtn; public static String DocumentDialog_openBtn; public static String DocumentDialog_typeLabel; public static String DocumentDialog_urlLabel; public static String DocumentDialog_valueLabel; ======= public static String DocumentPropertyPage_errActionIsBlank; public static String DocumentPropertyPage_errExists; >>>>>>> public static String DocumentDialog_actionLabel; public static String DocumentDialog_addAttachHeader; public static String DocumentDialog_attachSubHeader; public static String DocumentDialog_attachSubHeaderFeature; public static String DocumentDialog_attachSubHeaderShapefile; public static String DocumentDialog_attributeLabel; public static String DocumentDialog_descriptionLabel; public static String DocumentDialog_documentLabel; public static String DocumentDialog_editAttachHeader; public static String DocumentDialog_errValidFile; public static String DocumentDialog_errValidURL; public static String DocumentDialog_fileBtn; public static String DocumentDialog_fileLabel; public static String DocumentDialog_goBtn; public static String DocumentDialog_hotlinkHeader; public static String DocumentDialog_labelLabel; public static String DocumentDialog_newBtn; public static String DocumentDialog_openBtn; public static String DocumentDialog_typeLabel; public static String DocumentDialog_urlLabel; public static String DocumentDialog_valueLabel; public static String DocumentPropertyPage_errActionIsBlank; public static String DocumentPropertyPage_errExists;
<<<<<<< import com.daviancorp.android.data.classes.*; ======= import android.database.SQLException; import com.daviancorp.android.data.classes.ArenaQuest; import com.daviancorp.android.data.classes.ArenaReward; import com.daviancorp.android.data.classes.Armor; import com.daviancorp.android.data.classes.Combining; import com.daviancorp.android.data.classes.Component; import com.daviancorp.android.data.classes.Decoration; import com.daviancorp.android.data.classes.Gathering; import com.daviancorp.android.data.classes.HuntingFleet; import com.daviancorp.android.data.classes.HuntingReward; import com.daviancorp.android.data.classes.Item; import com.daviancorp.android.data.classes.ItemToSkillTree; import com.daviancorp.android.data.classes.Location; import com.daviancorp.android.data.classes.MogaWoodsReward; import com.daviancorp.android.data.classes.Monster; import com.daviancorp.android.data.classes.MonsterDamage; import com.daviancorp.android.data.classes.MonsterStatus; import com.daviancorp.android.data.classes.MonsterToArena; import com.daviancorp.android.data.classes.MonsterToQuest; import com.daviancorp.android.data.classes.MonsterWeakness; import com.daviancorp.android.data.classes.Quest; import com.daviancorp.android.data.classes.QuestReward; import com.daviancorp.android.data.classes.Skill; import com.daviancorp.android.data.classes.SkillTree; import com.daviancorp.android.data.classes.Weapon; import com.daviancorp.android.data.classes.Wishlist; import com.daviancorp.android.data.classes.WishlistComponent; import com.daviancorp.android.data.classes.WishlistData; import com.daviancorp.android.data.classes.WyporiumTrade; >>>>>>> import com.daviancorp.android.data.classes.*; import com.daviancorp.android.data.classes.ArenaQuest; import com.daviancorp.android.data.classes.ArenaReward; import com.daviancorp.android.data.classes.Armor; import com.daviancorp.android.data.classes.Combining; import com.daviancorp.android.data.classes.Component; import com.daviancorp.android.data.classes.Decoration; import com.daviancorp.android.data.classes.Gathering; import com.daviancorp.android.data.classes.HuntingFleet; import com.daviancorp.android.data.classes.HuntingReward; import com.daviancorp.android.data.classes.Item; import com.daviancorp.android.data.classes.ItemToSkillTree; import com.daviancorp.android.data.classes.Location; import com.daviancorp.android.data.classes.MogaWoodsReward; import com.daviancorp.android.data.classes.Monster; import com.daviancorp.android.data.classes.MonsterDamage; import com.daviancorp.android.data.classes.MonsterStatus; import com.daviancorp.android.data.classes.MonsterToArena; import com.daviancorp.android.data.classes.MonsterToQuest; import com.daviancorp.android.data.classes.MonsterWeakness; import com.daviancorp.android.data.classes.Quest; import com.daviancorp.android.data.classes.QuestReward; import com.daviancorp.android.data.classes.Skill; import com.daviancorp.android.data.classes.SkillTree; import com.daviancorp.android.data.classes.Weapon; import com.daviancorp.android.data.classes.Wishlist; import com.daviancorp.android.data.classes.WishlistComponent; import com.daviancorp.android.data.classes.WishlistData; import com.daviancorp.android.data.classes.WyporiumTrade; <<<<<<< /********************************* ARMOR SET BUILDER QUERIES ******************************************/ public ASBSetCursor queryASBSets() { return mHelper.queryASBSets(); } public ASBSet getASBSet(long id) { ASBSet set = null; ASBSetCursor cursor = mHelper.queryASBSet(id); cursor.moveToFirst(); if (!cursor.isAfterLast()) set = cursor.getASBSet(); cursor.close(); return set; } /** Get a cursor with a list of all armor sets. */ public ASBSessionCursor queryASBSessions() { return mHelper.queryASBSessions(); } /** Get a specific armor set. */ public ASBSession getASBSession(long id) { ASBSession session = null; ASBSessionCursor cursor = mHelper.queryASBSession(id); cursor.moveToFirst(); if (!cursor.isAfterLast()) session = cursor.getASBSession(mAppContext); cursor.close(); return session; } /** Adds a new ASB set to the list. */ public void queryAddASBSet(String name, int rank, int hunterType) { mHelper.queryAddASBSet(name, rank, hunterType); } /** Adds a new set that is a copy of the designated set to the list. */ public void queryAddASBSet(long setId) { ASBSet set = getASBSet(setId); mHelper.queryAddASBSet(set.getName(), set.getRank(), set.getHunterType()); } public void queryDeleteASBSet(long setId) { mHelper.queryDeleteASBSet(setId); } public void queryUpdateASBSet(long setId, String name, int rank, int hunterType) { mHelper.queryUpdateASBSet(setId, name, rank, hunterType); } public void queryPutASBSessionArmor(long asbSetId, long armorId, int pieceIndex) { mHelper.queryAddASBSessionArmor(asbSetId, armorId, pieceIndex); } public void queryRemoveASBSessionArmor(long asbSetId, int pieceIndex) { mHelper.queryAddASBSessionArmor(asbSetId, -1, pieceIndex); } public void queryPutASBSessionDecoration(long asbSetId, long decorationId, int pieceIndex, int decorationIndex) { mHelper.queryPutASBSessionDecoration(asbSetId, decorationId, pieceIndex, decorationIndex); } public void queryRemoveASBSessionDecoration(long asbSetId, int pieceIndex, int decorationIndex) { mHelper.queryPutASBSessionDecoration(asbSetId, -1, pieceIndex, decorationIndex); } public void queryCreateASBSessionTalisman(long asbSetId, int type, int slots, long skill1Id, int skill1Points, long skill2Id, int skill2Points) { mHelper.queryCreateASBSessionTalisman(asbSetId, type, slots, skill1Id, skill1Points, skill2Id, skill2Points); } public void queryRemoveASBSessionTalisman(long asbSetId) { mHelper.queryRemoveASBSessionTalisman(asbSetId); } ======= /**************************** WYPORIUM TRADE DATA QUERIES *************************************/ /* Get a Cursor that has a list of all wyporium trades */ public WyporiumTradeCursor queryWyporiumTrades() { return mHelper.queryWyporiumTrades(); } /* Get a specific wyporium trade */ public WyporiumTrade getWyporiumTrade(long id) { WyporiumTrade wyporiumTrade = null; WyporiumTradeCursor cursor = mHelper.queryWyporiumTrades(id); cursor.moveToFirst(); if (!cursor.isAfterLast()) wyporiumTrade = cursor.getWyporiumTrade(); cursor.close(); return wyporiumTrade; } >>>>>>> /********************************* ARMOR SET BUILDER QUERIES ******************************************/ public ASBSetCursor queryASBSets() { return mHelper.queryASBSets(); } public ASBSet getASBSet(long id) { ASBSet set = null; ASBSetCursor cursor = mHelper.queryASBSet(id); cursor.moveToFirst(); if (!cursor.isAfterLast()) set = cursor.getASBSet(); cursor.close(); return set; } /** Get a cursor with a list of all armor sets. */ public ASBSessionCursor queryASBSessions() { return mHelper.queryASBSessions(); } /** Get a specific armor set. */ public ASBSession getASBSession(long id) { ASBSession session = null; ASBSessionCursor cursor = mHelper.queryASBSession(id); cursor.moveToFirst(); if (!cursor.isAfterLast()) session = cursor.getASBSession(mAppContext); cursor.close(); return session; } /** Adds a new ASB set to the list. */ public void queryAddASBSet(String name, int rank, int hunterType) { mHelper.queryAddASBSet(name, rank, hunterType); } /** Adds a new set that is a copy of the designated set to the list. */ public void queryAddASBSet(long setId) { ASBSet set = getASBSet(setId); mHelper.queryAddASBSet(set.getName(), set.getRank(), set.getHunterType()); } public void queryDeleteASBSet(long setId) { mHelper.queryDeleteASBSet(setId); } public void queryUpdateASBSet(long setId, String name, int rank, int hunterType) { mHelper.queryUpdateASBSet(setId, name, rank, hunterType); } public void queryPutASBSessionArmor(long asbSetId, long armorId, int pieceIndex) { mHelper.queryAddASBSessionArmor(asbSetId, armorId, pieceIndex); } public void queryRemoveASBSessionArmor(long asbSetId, int pieceIndex) { mHelper.queryAddASBSessionArmor(asbSetId, -1, pieceIndex); } public void queryPutASBSessionDecoration(long asbSetId, long decorationId, int pieceIndex, int decorationIndex) { mHelper.queryPutASBSessionDecoration(asbSetId, decorationId, pieceIndex, decorationIndex); } public void queryRemoveASBSessionDecoration(long asbSetId, int pieceIndex, int decorationIndex) { mHelper.queryPutASBSessionDecoration(asbSetId, -1, pieceIndex, decorationIndex); } public void queryCreateASBSessionTalisman(long asbSetId, int type, int slots, long skill1Id, int skill1Points, long skill2Id, int skill2Points) { mHelper.queryCreateASBSessionTalisman(asbSetId, type, slots, skill1Id, skill1Points, skill2Id, skill2Points); } public void queryRemoveASBSessionTalisman(long asbSetId) { mHelper.queryRemoveASBSessionTalisman(asbSetId); } /**************************** WYPORIUM TRADE DATA QUERIES *************************************/ /* Get a Cursor that has a list of all wyporium trades */ public WyporiumTradeCursor queryWyporiumTrades() { return mHelper.queryWyporiumTrades(); } /* Get a specific wyporium trade */ public WyporiumTrade getWyporiumTrade(long id) { WyporiumTrade wyporiumTrade = null; WyporiumTradeCursor cursor = mHelper.queryWyporiumTrades(id); cursor.moveToFirst(); if (!cursor.isAfterLast()) wyporiumTrade = cursor.getWyporiumTrade(); cursor.close(); return wyporiumTrade; }
<<<<<<< ======= import android.support.v7.app.ActionBarActivity; import android.view.LayoutInflater; >>>>>>> import android.support.v7.app.ActionBarActivity; import android.view.LayoutInflater; <<<<<<< ======= import android.widget.ArrayAdapter; import android.widget.ImageView; >>>>>>> import android.widget.ArrayAdapter; import android.widget.ImageView; <<<<<<< private MenuDrawerListAdapter mDrawerAdapter; ======= private DrawerAdapter mDrawerAdapter; >>>>>>> private DrawerAdapter mDrawerAdapter; <<<<<<< mDrawerAdapter = new MenuDrawerListAdapter(menuArray); ======= mDrawerAdapter = new DrawerAdapter(getApplicationContext(), R.layout.drawer_list_item, menuArray); >>>>>>> mDrawerAdapter = new DrawerAdapter(getApplicationContext(), R.layout.drawer_list_item, menuArray);
<<<<<<< import com.daviancorp.android.ui.list.*; ======= import com.daviancorp.android.ui.list.ArmorListActivity; import com.daviancorp.android.ui.list.CombiningListActivity; import com.daviancorp.android.ui.list.DecorationListActivity; import com.daviancorp.android.ui.list.ItemListActivity; import com.daviancorp.android.ui.list.LocationListActivity; import com.daviancorp.android.ui.list.MonsterListActivity; import com.daviancorp.android.ui.list.QuestListActivity; import com.daviancorp.android.ui.list.SkillTreeListActivity; import com.daviancorp.android.ui.list.WeaponSelectionListActivity; import com.daviancorp.android.ui.list.WishlistListActivity; import com.daviancorp.android.ui.list.WyporiumTradeListActivity; >>>>>>> import com.daviancorp.android.ui.list.*; import com.daviancorp.android.ui.list.ArmorListActivity; import com.daviancorp.android.ui.list.CombiningListActivity; import com.daviancorp.android.ui.list.DecorationListActivity; import com.daviancorp.android.ui.list.ItemListActivity; import com.daviancorp.android.ui.list.LocationListActivity; import com.daviancorp.android.ui.list.MonsterListActivity; import com.daviancorp.android.ui.list.QuestListActivity; import com.daviancorp.android.ui.list.SkillTreeListActivity; import com.daviancorp.android.ui.list.WeaponSelectionListActivity; import com.daviancorp.android.ui.list.WishlistListActivity; import com.daviancorp.android.ui.list.WyporiumTradeListActivity; <<<<<<< case 10: intent = new Intent(GenericActionBarActivity.this, ASBSetListActivity.class); ======= case 10: // Wyporium Trade intent = new Intent(GenericActionBarActivity.this, WyporiumTradeListActivity.class); break; >>>>>>> case 10: // Wyporium Trade intent = new Intent(GenericActionBarActivity.this, WyporiumTradeListActivity.class); break; case 11: intent = new Intent(GenericActionBarActivity.this, ASBSetListActivity.class); break;
<<<<<<< ======= import java.io.IOException; import java.util.HashMap; import java.util.List; >>>>>>> import java.io.IOException; import java.util.HashMap; import java.util.List; <<<<<<< ======= import android.widget.ListView; import android.widget.RelativeLayout; >>>>>>> import android.widget.ListView; import android.widget.RelativeLayout; <<<<<<< // super.setContextMenu(v); return inflater.inflate(R.layout.fragment_generic_list, container,false); ======= View v = inflater.inflate(R.layout.fragment_generic_list, null); ListView view = (ListView) v.findViewById(android.R.id.list); // super.setContextMenu(v); return v; >>>>>>> View v = inflater.inflate(R.layout.fragment_generic_list, null); ListView view = (ListView) v.findViewById(android.R.id.list); // super.setContextMenu(v); return v; <<<<<<< TextView specialtv = (TextView) view.findViewById(R.id.special_text); DrawSharpness sharpnessDrawable = (DrawSharpness) view.findViewById(R.id.sharpness); // Need to reset sharpness so it gets redrawn, not recycled sharpnessDrawable.invalidate(); ======= >>>>>>>
<<<<<<< ======= import org.jclouds.vcloud.director.v1_5.domain.UsersList; import org.jclouds.vcloud.director.v1_5.domain.Vdcs; import org.jclouds.vcloud.director.v1_5.features.admin.GroupClient; >>>>>>> import org.jclouds.vcloud.director.v1_5.features.admin.AdminOrgClient; <<<<<<< assertEquals(client.getAdminOrgClient().getOrg(orgRef.getHref()), expected); } public static final AdminOrg adminOrg() { return AdminOrg.builder() .name("JClouds") .id("urn:vcloud:org:6f312e42-cd2b-488d-a2bb-97519cd57ed0") .type("application/vnd.vmware.admin.organization+xml") .href(URI.create("https://vcloudbeta.bluelock.com/api/admin/org/6f312e42-cd2b-488d-a2bb-97519cd57ed0")) .link(Link.builder() .rel("down") .type("application/vnd.vmware.vcloud.tasksList+xml") .href(URI.create("https://vcloudbeta.bluelock.com/api/tasksList/6f312e42-cd2b-488d-a2bb-97519cd57ed0")) .build()) .link(Link.builder() .rel("down") .type("application/vnd.vmware.vcloud.metadata+xml") .href(URI.create("https://vcloudbeta.bluelock.com/api/admin/org/6f312e42-cd2b-488d-a2bb-97519cd57ed0/metadata")) .build()) .link(Link.builder() .rel("add") .type("application/vnd.vmware.admin.catalog+xml") .href(URI.create("https://vcloudbeta.bluelock.com/api/admin/org/6f312e42-cd2b-488d-a2bb-97519cd57ed0/catalogs")) .build()) .link(Link.builder() .rel("add") .type("application/vnd.vmware.admin.user+xml") .href(URI.create("https://vcloudbeta.bluelock.com/api/admin/org/6f312e42-cd2b-488d-a2bb-97519cd57ed0/users")) .build()) .link(Link.builder() .rel("add") .type("application/vnd.vmware.admin.group+xml") .href(URI.create("https://vcloudbeta.bluelock.com/api/admin/org/6f312e42-cd2b-488d-a2bb-97519cd57ed0/groups")) .build()) .link(Link.builder() .rel("add") .type("application/vnd.vmware.admin.orgNetwork+xml") .href(URI.create("https://vcloudbeta.bluelock.com/api/admin/org/6f312e42-cd2b-488d-a2bb-97519cd57ed0/networks")) .build()) .link(Link.builder() .rel("edit") .type("application/vnd.vmware.admin.organization+xml") .href(URI.create("https://vcloudbeta.bluelock.com/api/admin/org/6f312e42-cd2b-488d-a2bb-97519cd57ed0")) .build()) .link(Link.builder() .rel("remove") .href(URI.create("https://vcloudbeta.bluelock.com/api/admin/org/6f312e42-cd2b-488d-a2bb-97519cd57ed0")) .build()) .link(Link.builder() .rel("alternate") .type("application/vnd.vmware.vcloud.org+xml") .href(URI.create("https://vcloudbeta.bluelock.com/api/org/6f312e42-cd2b-488d-a2bb-97519cd57ed0")) .build()) .description("") .fullName("JClouds") .isEnabled(true) .settings(settings()) .user(Reference.builder() .type("application/vnd.vmware.admin.user+xml") .name("[email protected]") .href(URI.create("https://vcloudbeta.bluelock.com/api/admin/user/672ebb67-d8ff-4201-9c1b-c1be869e526c")) .build()) .user(Reference.builder() .type("application/vnd.vmware.admin.user+xml") .name("[email protected]") .href(URI.create("https://vcloudbeta.bluelock.com/api/admin/user/8c360b93-ed25-4c9a-8e24-d48cd9966d93")) .build()) .user(Reference.builder() .type("application/vnd.vmware.admin.user+xml") .name("[email protected]") .href(URI.create("https://vcloudbeta.bluelock.com/api/admin/user/967d317c-4273-4a95-b8a4-bf63b78e9c69")) .build()) .user(Reference.builder() .type("application/vnd.vmware.admin.user+xml") .name("[email protected]") .href(URI.create("https://vcloudbeta.bluelock.com/api/admin/user/ae75edd2-12de-414c-8e85-e6ea10442c08")) .build()) .user(Reference.builder() .type("application/vnd.vmware.admin.user+xml") .name("[email protected]") .href(URI.create("https://vcloudbeta.bluelock.com/api/admin/user/e9eb1b29-0404-4c5e-8ef7-e584acc51da9")) .build()) .catalog(Reference.builder() .type("application/vnd.vmware.admin.catalog+xml") .name("QunyingTestCatalog") .href(URI.create("https://vcloudbeta.bluelock.com/api/admin/catalog/7212e451-76e1-4631-b2de-ba1dfd8080e4")) .build()) .catalog(Reference.builder() .type("application/vnd.vmware.admin.catalog+xml") .name("Public") .href(URI.create("https://vcloudbeta.bluelock.com/api/admin/catalog/9e08c2f6-077a-42ce-bece-d5332e2ebb5c")) .build()) .catalog(Reference.builder() .type("application/vnd.vmware.admin.catalog+xml") .name("dantest") .href(URI.create("https://vcloudbeta.bluelock.com/api/admin/catalog/b542aff4-9f97-4f51-a126-4330fbf62f02")) .build()) .catalog(Reference.builder() .type("application/vnd.vmware.admin.catalog+xml") .name("test") .href(URI.create("https://vcloudbeta.bluelock.com/api/admin/catalog/b7289d54-4ca4-497f-9a93-2d4afc97e3da")) .build()) .vdc(Reference.builder() .type("application/vnd.vmware.vcloud.vdc+xml") .name("Cluster01-JClouds") .href(URI.create("https://vcloudbeta.bluelock.com/api/vdc/d16d333b-e3c0-4176-845d-a5ee6392df07")) .build()) .network(Reference.builder() .type("application/vnd.vmware.admin.network+xml") .name("ilsolation01-Jclouds") .href(URI.create("https://vcloudbeta.bluelock.com/api/admin/network/f3ba8256-6f48-4512-aad6-600e85b4dc38")) .build()) .network(Reference.builder() .type("application/vnd.vmware.admin.network+xml") .name("internet01-Jclouds") .href(URI.create("https://vcloudbeta.bluelock.com/api/admin/network/55a677cf-ab3f-48ae-b880-fab90421980c")) .build()) .build(); ======= assertEquals(client.getOrgClient().getOrg(orgRef.getHref()), expected); >>>>>>> assertEquals(client.getOrgClient().getOrg(orgRef.getHref()), expected); } public static final AdminOrg adminOrg() { return AdminOrg.builder() .name("JClouds") .id("urn:vcloud:org:6f312e42-cd2b-488d-a2bb-97519cd57ed0") .type("application/vnd.vmware.admin.organization+xml") .href(URI.create("https://vcloudbeta.bluelock.com/api/admin/org/6f312e42-cd2b-488d-a2bb-97519cd57ed0")) .link(Link.builder() .rel("down") .type("application/vnd.vmware.vcloud.tasksList+xml") .href(URI.create("https://vcloudbeta.bluelock.com/api/tasksList/6f312e42-cd2b-488d-a2bb-97519cd57ed0")) .build()) .link(Link.builder() .rel("down") .type("application/vnd.vmware.vcloud.metadata+xml") .href(URI.create("https://vcloudbeta.bluelock.com/api/admin/org/6f312e42-cd2b-488d-a2bb-97519cd57ed0/metadata")) .build()) .link(Link.builder() .rel("add") .type("application/vnd.vmware.admin.catalog+xml") .href(URI.create("https://vcloudbeta.bluelock.com/api/admin/org/6f312e42-cd2b-488d-a2bb-97519cd57ed0/catalogs")) .build()) .link(Link.builder() .rel("add") .type("application/vnd.vmware.admin.user+xml") .href(URI.create("https://vcloudbeta.bluelock.com/api/admin/org/6f312e42-cd2b-488d-a2bb-97519cd57ed0/users")) .build()) .link(Link.builder() .rel("add") .type("application/vnd.vmware.admin.group+xml") .href(URI.create("https://vcloudbeta.bluelock.com/api/admin/org/6f312e42-cd2b-488d-a2bb-97519cd57ed0/groups")) .build()) .link(Link.builder() .rel("add") .type("application/vnd.vmware.admin.orgNetwork+xml") .href(URI.create("https://vcloudbeta.bluelock.com/api/admin/org/6f312e42-cd2b-488d-a2bb-97519cd57ed0/networks")) .build()) .link(Link.builder() .rel("edit") .type("application/vnd.vmware.admin.organization+xml") .href(URI.create("https://vcloudbeta.bluelock.com/api/admin/org/6f312e42-cd2b-488d-a2bb-97519cd57ed0")) .build()) .link(Link.builder() .rel("remove") .href(URI.create("https://vcloudbeta.bluelock.com/api/admin/org/6f312e42-cd2b-488d-a2bb-97519cd57ed0")) .build()) .link(Link.builder() .rel("alternate") .type("application/vnd.vmware.vcloud.org+xml") .href(URI.create("https://vcloudbeta.bluelock.com/api/org/6f312e42-cd2b-488d-a2bb-97519cd57ed0")) .build()) .description("") .fullName("JClouds") .isEnabled(true) .settings(settings()) .user(Reference.builder() .type("application/vnd.vmware.admin.user+xml") .name("[email protected]") .href(URI.create("https://vcloudbeta.bluelock.com/api/admin/user/672ebb67-d8ff-4201-9c1b-c1be869e526c")) .build()) .user(Reference.builder() .type("application/vnd.vmware.admin.user+xml") .name("[email protected]") .href(URI.create("https://vcloudbeta.bluelock.com/api/admin/user/8c360b93-ed25-4c9a-8e24-d48cd9966d93")) .build()) .user(Reference.builder() .type("application/vnd.vmware.admin.user+xml") .name("[email protected]") .href(URI.create("https://vcloudbeta.bluelock.com/api/admin/user/967d317c-4273-4a95-b8a4-bf63b78e9c69")) .build()) .user(Reference.builder() .type("application/vnd.vmware.admin.user+xml") .name("[email protected]") .href(URI.create("https://vcloudbeta.bluelock.com/api/admin/user/ae75edd2-12de-414c-8e85-e6ea10442c08")) .build()) .user(Reference.builder() .type("application/vnd.vmware.admin.user+xml") .name("[email protected]") .href(URI.create("https://vcloudbeta.bluelock.com/api/admin/user/e9eb1b29-0404-4c5e-8ef7-e584acc51da9")) .build()) .catalog(Reference.builder() .type("application/vnd.vmware.admin.catalog+xml") .name("QunyingTestCatalog") .href(URI.create("https://vcloudbeta.bluelock.com/api/admin/catalog/7212e451-76e1-4631-b2de-ba1dfd8080e4")) .build()) .catalog(Reference.builder() .type("application/vnd.vmware.admin.catalog+xml") .name("Public") .href(URI.create("https://vcloudbeta.bluelock.com/api/admin/catalog/9e08c2f6-077a-42ce-bece-d5332e2ebb5c")) .build()) .catalog(Reference.builder() .type("application/vnd.vmware.admin.catalog+xml") .name("dantest") .href(URI.create("https://vcloudbeta.bluelock.com/api/admin/catalog/b542aff4-9f97-4f51-a126-4330fbf62f02")) .build()) .catalog(Reference.builder() .type("application/vnd.vmware.admin.catalog+xml") .name("test") .href(URI.create("https://vcloudbeta.bluelock.com/api/admin/catalog/b7289d54-4ca4-497f-9a93-2d4afc97e3da")) .build()) .vdc(Reference.builder() .type("application/vnd.vmware.vcloud.vdc+xml") .name("Cluster01-JClouds") .href(URI.create("https://vcloudbeta.bluelock.com/api/vdc/d16d333b-e3c0-4176-845d-a5ee6392df07")) .build()) .network(Reference.builder() .type("application/vnd.vmware.admin.network+xml") .name("ilsolation01-Jclouds") .href(URI.create("https://vcloudbeta.bluelock.com/api/admin/network/f3ba8256-6f48-4512-aad6-600e85b4dc38")) .build()) .network(Reference.builder() .type("application/vnd.vmware.admin.network+xml") .name("internet01-Jclouds") .href(URI.create("https://vcloudbeta.bluelock.com/api/admin/network/55a677cf-ab3f-48ae-b880-fab90421980c")) .build()) .build();
<<<<<<< import org.jclouds.rest.ResourceNotFoundException; import org.jclouds.vcloud.director.v1_5.VCloudDirectorClient; ======= import org.jclouds.vcloud.director.v1_5.VCloudDirectorException; >>>>>>> import org.jclouds.rest.ResourceNotFoundException; <<<<<<< @Test(groups = { "unit", "admin", "adminUser" }, singleThreaded = true, testName = "UserClientExpectTest") public class UserClientExpectTest extends BaseVCloudDirectorRestClientExpectTest { ======= @Test(groups = { "unit", "admin", "adminUser"}, singleThreaded = true, testName = "UserClientExpectTest") public class UserClientExpectTest extends BaseVCloudDirectorRestClientExpectTest<VCloudDirectorAdminClient> { >>>>>>> @Test(groups = { "unit", "admin", "adminUser"}, singleThreaded = true, testName = "UserClientExpectTest") public class UserClientExpectTest extends BaseVCloudDirectorRestClientExpectTest<VCloudDirectorAdminClient> {
<<<<<<< scan.setSmall(true); scan.setCaching(2); // Limit the batch size for performance ======= // Limit the batch size for performance // Setting caching to 2 instead of 1 removes an extra RPC during Single Row Result Scans scan.setCaching(2); >>>>>>> scan.setSmall(true); scan.setCaching(2); // Limit the batch size for performance // Setting caching to 2 instead of 1 removes an extra RPC during Single Row Result Scans
<<<<<<< ======= import com.splicemachine.derby.ddl.DDLCoordinationFactory; import com.splicemachine.pipeline.exception.ErrorState; import com.splicemachine.pipeline.exception.Exceptions; import com.splicemachine.si.api.Txn; import com.splicemachine.si.api.TxnView; import com.splicemachine.si.impl.TransactionLifecycle; import com.splicemachine.stream.Stream; import com.splicemachine.stream.StreamException; import com.splicemachine.utils.SpliceLogUtils; >>>>>>> import com.splicemachine.derby.ddl.DDLCoordinationFactory; import com.splicemachine.pipeline.exception.ErrorState; import com.splicemachine.pipeline.exception.Exceptions; import com.splicemachine.si.api.Txn; import com.splicemachine.si.api.TxnView; import com.splicemachine.si.impl.TransactionLifecycle; import com.splicemachine.stream.Stream; import com.splicemachine.stream.StreamException; import com.splicemachine.utils.SpliceLogUtils; <<<<<<< import com.splicemachine.db.shared.common.reference.SQLState; import com.splicemachine.db.shared.common.sanity.SanityManager; import com.splicemachine.derby.ddl.DDLCoordinationFactory; import com.splicemachine.pipeline.ddl.DDLChange; import com.splicemachine.si.api.Txn; import com.splicemachine.si.api.TxnView; import com.splicemachine.stream.Stream; import com.splicemachine.stream.StreamException; import com.splicemachine.utils.SpliceLogUtils; ======= import org.apache.hadoop.hbase.util.Bytes; >>>>>>> import com.splicemachine.db.shared.common.reference.SQLState; import com.splicemachine.db.shared.common.sanity.SanityManager; import com.splicemachine.derby.ddl.DDLCoordinationFactory; import com.splicemachine.pipeline.ddl.DDLChange; import com.splicemachine.si.api.Txn; import com.splicemachine.si.api.TxnView; import com.splicemachine.stream.Stream; import com.splicemachine.stream.StreamException; import com.splicemachine.utils.SpliceLogUtils; import org.apache.hadoop.hbase.util.Bytes;
<<<<<<< public CreateFkTask(String jobId, int[] backingIndexFormatIds, long referencedConglomerateId, long referencingConglomerateId, String referencedTableName) { super(jobId, SpliceConstants.operationTaskPriority, null); ======= public CreateFkTask(String jobId, int[] backingIndexFormatIds, long referencedConglomerateId, long referencingConglomerateId, String referencedTableName, String referencedTableVersion) { super(jobId, OperationJob.operationTaskPriority, null); >>>>>>> public CreateFkTask(String jobId, int[] backingIndexFormatIds, long referencedConglomerateId, long referencingConglomerateId, String referencedTableName, String referencedTableVersion) { super(jobId, SpliceConstants.operationTaskPriority, null);
<<<<<<< private Properties defaultProperties; ======= @SuppressWarnings("deprecation") private HTableInterface spliceSequencesTable; >>>>>>> private Properties defaultProperties; @SuppressWarnings("deprecation") private HTableInterface spliceSequencesTable;
<<<<<<< import java.util.Collections; import java.util.LinkedList; import java.util.List; import java.util.Map; import java.util.NoSuchElementException; ======= >>>>>>> import java.util.Collections; import java.util.LinkedList; import java.util.List; import java.util.Map; import java.util.NoSuchElementException; <<<<<<< import com.splicemachine.job.JobFuture; ======= import com.splicemachine.job.JobResults; >>>>>>> import com.splicemachine.job.JobFuture; import com.splicemachine.job.JobResults;
<<<<<<< cleanWatcher = Executors.newSingleThreadExecutor(factory); ======= int cleanerThreads = configuration.getInt(CLEANER_JOBS, DEFAULT_CLEANER_JOBS); cleanWatcher = new ThreadPoolExecutor(1,cleanerThreads,60, TimeUnit.SECONDS,new LinkedBlockingQueue<Runnable>(),factory); >>>>>>> int cleanerThreads = configuration.getInt(CLEANER_JOBS, DEFAULT_CLEANER_JOBS); cleanWatcher = new ThreadPoolExecutor(1,cleanerThreads,60, TimeUnit.SECONDS,new LinkedBlockingQueue<Runnable>(),factory); <<<<<<< TempCleanJob job = new TempCleanJob(uid,start,finish,taskPriority); try { final JobFuture future = SpliceDriver.driver().getJobScheduler().submit(job); cleanWatcher.submit(new Callable<Void>() { @Override public Void call() throws Exception { try{ future.completeAll(); }finally{ SpliceDriver.driver().getJobScheduler().cleanupJob(future); } return null; } }); } catch (ExecutionException e) { throw Exceptions.parseException(e); } ======= final TempCleanJob job = new TempCleanJob(uid,start,finish,taskPriority); // cleanWatcher.submit(new Callable<Void>() { // @Override // public Void call() throws Exception { // JobFuture future = SpliceDriver.driver().getJobScheduler().submit(job); // try{ // future.completeAll(); // }finally{ // future.cleanup(); // } // // return null; // } // }); >>>>>>> final TempCleanJob job = new TempCleanJob(uid,start,finish,taskPriority); cleanWatcher.submit(new Callable<Void>() { @Override public Void call() throws Exception { JobFuture future = SpliceDriver.driver().getJobScheduler().submit(job); try{ future.completeAll(); }finally{ future.cleanup(); } return null; } });
<<<<<<< import com.splicemachine.derby.iapi.storage.RowProvider; import com.splicemachine.derby.stats.SinkStats; ======= import java.io.IOException; import java.util.List; >>>>>>> import com.splicemachine.derby.iapi.storage.RowProvider; import com.splicemachine.derby.stats.SinkStats; import java.io.IOException; import java.util.List;
<<<<<<< import com.google.common.hash.HashFunction; import com.google.common.hash.Hasher; import com.google.common.hash.Hashing; import com.splicemachine.constants.SpliceConstants; ======= >>>>>>> <<<<<<< import com.splicemachine.derby.utils.HashUtils; import com.splicemachine.derby.utils.SpliceUtils; ======= >>>>>>> import com.splicemachine.derby.utils.HashUtils;
<<<<<<< import android.app.Activity; ======= import android.content.Context; >>>>>>> <<<<<<< ======= import android.widget.AdapterView; import android.widget.FilterQueryProvider; >>>>>>> import android.widget.AdapterView; import android.widget.FilterQueryProvider; <<<<<<< protected FriendListAdapter getFriendsAdapter() { friends = App.getInstance().getFriends(); return new FriendListAdapter(baseActivity, friends); } @Override protected AbsFriendListLoader onFriendsLoaderCreate(Activity activity, Bundle args) { return new FriendListLoader(activity); } @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View view = super.onCreateView(inflater, container, savedInstanceState); isImportInitialized = App.getInstance().getPrefsHelper().getPref(PrefsHelper.PREF_IMPORT_INITIALIZED, false); initGlobalSearchButton(inflater); return view; } @Override ======= >>>>>>> public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { listView = (ListView) inflater.inflate(R.layout.fragment_friend_list, container, false); listTitleView = inflater.inflate(R.layout.view_section_title_friends_list, null); listTitle = (TextView) listTitleView.findViewById(R.id.listTitle); listTitle.setVisibility(View.GONE); listView.addHeaderView(listTitleView); isImportInitialized = App.getInstance().getPrefsHelper().getPref(PrefsHelper.PREF_IMPORT_INITIALIZED, false); initGlobalSearchButton(inflater); initFriendList(); return listView; } @Override
<<<<<<< import com.splicemachine.derby.impl.sql.execute.operations.*; ======= import com.splicemachine.derby.impl.sql.execute.operations.batchonce.BatchOnceOperation; >>>>>>> import com.splicemachine.derby.impl.sql.execute.operations.*; import com.splicemachine.derby.impl.sql.execute.operations.batchonce.BatchOnceOperation; <<<<<<< ======= return new OperationResultSet(activation, op); >>>>>>>
<<<<<<< childTxn = beginChildTransaction(indexTransaction, tentativeIndex.getIndex().getConglomerate()); ScanSetBuilder<LocatedRow> builder = dsp.newScanSet(null,Long.toString(tentativeIndex.getTable().getConglomerate())); builder.tableDisplayName(tableName) .demarcationPoint(demarcationPoint) .transaction(indexTransaction) .scan(DDLUtils.createFullScan()) .keyColumnEncodingOrder(Ints.toArray(tentativeIndex.getTable().getColumnOrderingList())) .execRowTypeFormatIds(indexFormatIds) .reuseRowLocation(false) .operationContext(dsp.createOperationContext((Activation) null)) .rowDecodingMap(rowDecodingMap) .keyColumnTypes(ScanOperation.getKeyFormatIds( Ints.toArray(tentativeIndex.getTable().getColumnOrderingList()), Ints.toArray(tentativeIndex.getTable().getFormatIdsList()) )) .keyDecodingMap(ScanOperation.getKeyDecodingMap(accessedKeyCols, Ints.toArray(tentativeIndex.getTable().getColumnOrderingList()), baseColumnMap )) .accessedKeyColumns(accessedKeyCols) .template(WriteReadUtils.getExecRowFromTypeFormatIds(indexFormatIds)); ======= IndexScanSetBuilder<KVPair> indexBuilder = dsp.newIndexScanSet(null,Long.toString(tentativeIndex.getTable().getConglomerate())); ScanSetBuilder<KVPair> scanSetBuilder = indexBuilder .indexColToMainColPosMap(Ints.toArray(tentativeIndex.getIndex().getIndexColsToMainColMapList())) .tableDisplayName(tableName) .operationContext(dsp.createOperationContext(activation)) .transaction(indexTransaction) .demarcationPoint(demarcationPoint) .scan(DDLUtils.createFullScan()); >>>>>>> childTxn = beginChildTransaction(indexTransaction, tentativeIndex.getIndex().getConglomerate()); ScanSetBuilder<LocatedRow> builder = dsp.newScanSet(null,Long.toString(tentativeIndex.getTable().getConglomerate())); builder.tableDisplayName(tableName) .demarcationPoint(demarcationPoint) .transaction(indexTransaction) .scan(DDLUtils.createFullScan()) .keyColumnEncodingOrder(Ints.toArray(tentativeIndex.getTable().getColumnOrderingList())) .execRowTypeFormatIds(indexFormatIds) .reuseRowLocation(false) .operationContext(dsp.createOperationContext(activation)) .rowDecodingMap(rowDecodingMap) .keyColumnTypes(ScanOperation.getKeyFormatIds( Ints.toArray(tentativeIndex.getTable().getColumnOrderingList()), Ints.toArray(tentativeIndex.getTable().getFormatIdsList()) )) .keyDecodingMap(ScanOperation.getKeyDecodingMap(accessedKeyCols, Ints.toArray(tentativeIndex.getTable().getColumnOrderingList()), baseColumnMap )) .accessedKeyColumns(accessedKeyCols) .template(WriteReadUtils.getExecRowFromTypeFormatIds(indexFormatIds));
<<<<<<< mb.push(targetTableDescriptor.getVersion()); ======= mb.push(this.printExplainInformationForActivation()); >>>>>>> mb.push(targetTableDescriptor.getVersion()); mb.push(this.printExplainInformationForActivation());
<<<<<<< case OLAPALWAYSPENALIZENLJ: boolean olapAlwaysPenalizeNLJ = Boolean.parseBoolean(valString); properties[OLAPALWAYSPENALIZENLJ.getId()] = olapAlwaysPenalizeNLJ; break; ======= case DISABLEPREDSFORINDEXORPKACCESSPATH: boolean disablePredsForIndexOrPrimaryKeyAccessPath = Boolean.parseBoolean(valString); properties[DISABLEPREDSFORINDEXORPKACCESSPATH.getId()] = disablePredsForIndexOrPrimaryKeyAccessPath; break; case ALWAYSALLOWINDEXPREFIXITERATION: boolean alwaysAllowIndexPrefixIteration = Boolean.parseBoolean(valString); properties[ALWAYSALLOWINDEXPREFIXITERATION.getId()] = alwaysAllowIndexPrefixIteration; break; >>>>>>> case OLAPALWAYSPENALIZENLJ: boolean olapAlwaysPenalizeNLJ = Boolean.parseBoolean(valString); properties[OLAPALWAYSPENALIZENLJ.getId()] = olapAlwaysPenalizeNLJ; case DISABLEPREDSFORINDEXORPKACCESSPATH: boolean disablePredsForIndexOrPrimaryKeyAccessPath = Boolean.parseBoolean(valString); properties[DISABLEPREDSFORINDEXORPKACCESSPATH.getId()] = disablePredsForIndexOrPrimaryKeyAccessPath; break; case ALWAYSALLOWINDEXPREFIXITERATION: boolean alwaysAllowIndexPrefixIteration = Boolean.parseBoolean(valString); properties[ALWAYSALLOWINDEXPREFIXITERATION.getId()] = alwaysAllowIndexPrefixIteration; break;
<<<<<<< import com.splicemachine.derby.impl.SpliceSpark; ======= import com.splicemachine.db.iapi.types.SQLLongint; >>>>>>> import com.splicemachine.derby.impl.SpliceSpark; import com.splicemachine.db.iapi.types.SQLLongint;
<<<<<<< mb.push(targetTableDescriptor.getVersion()); mb.callMethod(VMOpcode.INVOKEINTERFACE, (String) null, resultSetGetter, ClassName.ResultSet, argCount+3); ======= if ("getDeleteResultSet".equals(resultSetGetter)) { mb.push(this.printExplainInformationForActivation()); argCount++; } mb.callMethod(VMOpcode.INVOKEINTERFACE, (String) null, resultSetGetter, ClassName.ResultSet, argCount+2); >>>>>>> mb.push(targetTableDescriptor.getVersion()); if ("getDeleteResultSet".equals(resultSetGetter)) { mb.push(this.printExplainInformationForActivation()); argCount++; } mb.callMethod(VMOpcode.INVOKEINTERFACE, (String) null, resultSetGetter, ClassName.ResultSet, argCount+3);
<<<<<<< public class TransactorFactoryImpl extends SIConstants implements TransactorFactory { ======= /** * Source of transactors. If code needs a transactor and wasn't handed one, then it can use the static methods here to * obtain "the" transactor. */ public class TransactorFactoryImpl implements TransactorFactory { >>>>>>> /** * Source of transactors. If code needs a transactor and wasn't handed one, then it can use the static methods here to * obtain "the" transactor. */ public class TransactorFactoryImpl extends SIConstants implements TransactorFactory { <<<<<<< private static Transactor getTransactor(HbaseConfigurationSource configSource) { if (transactor == null) { synchronized (TransactorFactoryImpl.class) { final Configuration configuration = configSource.getConfiguration(); TransactionTableCreator.createTransactionTableIfNeeded(configuration); TimestampSource timestampSource = new ZooKeeperTimestampSource(SpliceConstants.DEFAULT_TRANSACTION_PATH); transactor = com.splicemachine.si.data.hbase.TransactorFactory.getTransactor(configuration, timestampSource); com.splicemachine.si.data.hbase.TransactorFactory.setDefaultTransactor(transactor); ======= public static Transactor getTransactor(final Configuration conf){ return getTransactor(new HbaseConfigurationSource() { @Override public Configuration getConfiguration() { return conf; >>>>>>> public static Transactor getTransactor(final Configuration conf){ return getTransactor(new HbaseConfigurationSource() { @Override public Configuration getConfiguration() { return conf;
<<<<<<< import com.splicemachine.utils.SpliceZooKeeperManager; ======= import com.splicemachine.derby.utils.ByteDataOutput; import com.splicemachine.derby.utils.SpliceZooKeeperManager; import com.splicemachine.job.Status; >>>>>>> import com.splicemachine.utils.SpliceZooKeeperManager; import com.splicemachine.derby.utils.ByteDataOutput; import com.splicemachine.job.Status; <<<<<<< ======= import org.apache.hadoop.hbase.zookeeper.RecoverableZooKeeper; import org.apache.zookeeper.CreateMode; import org.apache.zookeeper.KeeperException; import org.apache.zookeeper.ZooDefs; >>>>>>> import org.apache.hadoop.hbase.zookeeper.RecoverableZooKeeper; import org.apache.zookeeper.CreateMode; import org.apache.zookeeper.KeeperException; import org.apache.zookeeper.ZooDefs;
<<<<<<< import com.splicemachine.derby.iapi.sql.execute.SpliceOperationContext; import com.splicemachine.derby.stats.SinkStats; import com.splicemachine.derby.utils.SpliceUtils; import com.splicemachine.hbase.SafeTable; import com.splicemachine.utils.SpliceLogUtils; ======= import java.io.IOException; >>>>>>> import com.splicemachine.derby.iapi.sql.execute.SpliceOperationContext; import com.splicemachine.derby.stats.SinkStats; import com.splicemachine.derby.utils.SpliceUtils; import com.splicemachine.hbase.SafeTable; import com.splicemachine.utils.SpliceLogUtils; import java.io.IOException;
<<<<<<< /* Pull rows from firstResultSet, then secondResultSet*/ public SpliceOperation firstResultSet; public SpliceOperation secondResultSet; ======= /* Pull rows from firstResultSet, then rightResultSet*/ public SpliceOperation leftResultSet; public SpliceOperation rightResultSet; >>>>>>> /* Pull rows from firstResultSet, then rightResultSet*/ public SpliceOperation leftResultSet; public SpliceOperation rightResultSet; <<<<<<< private Boolean isLeft = null; ======= private static List<NodeType> sequentialNodeTypes = Arrays.asList(NodeType.SCAN); private SpliceRuntimeContext.Side side = SpliceRuntimeContext.Side.LEFT; >>>>>>> private SpliceRuntimeContext.Side side = SpliceRuntimeContext.Side.LEFT; <<<<<<< ======= public SpliceNoPutResultSet executeScan(SpliceRuntimeContext runtimeContext) throws StandardException { SpliceRuntimeContext spliceLeftRuntimeContext = runtimeContext.copy(); spliceLeftRuntimeContext.addLeftRuntimeContext(resultSetNumber); SpliceRuntimeContext spliceRightRuntimeContext = runtimeContext.copy(); spliceRightRuntimeContext.addRightRuntimeContext(resultSetNumber); try { RowProvider leftProvider = leftResultSet.getMapRowProvider(this, OperationUtils.getPairDecoder(leftResultSet, spliceLeftRuntimeContext),spliceLeftRuntimeContext); RowProvider rightProvider = rightResultSet.getMapRowProvider(this, OperationUtils.getPairDecoder(rightResultSet, spliceRightRuntimeContext),spliceRightRuntimeContext); return new SpliceNoPutResultSet(activation,this,RowProviders.combine(leftProvider, rightProvider)); } catch (IOException e) { throw Exceptions.parseException(e); } } @Override >>>>>>> <<<<<<< ======= public void open() throws StandardException, IOException { super.open(); leftResultSet.open(); rightResultSet.open(); } @Override public void close() throws StandardException, IOException { super.close(); if (leftResultSet != null) leftResultSet.close(); if (rightResultSet != null) rightResultSet.close(); } @Override >>>>>>> <<<<<<< ======= public ExecRow nextRow(SpliceRuntimeContext spliceRuntimeContext) throws StandardException, IOException { ExecRow row; SpliceRuntimeContext.Side side = spliceRuntimeContext.getPathSide(resultSetNumber); if(timer==null) timer = spliceRuntimeContext.newTimer(); timer.startTiming(); switch (side) { case LEFT: row = leftResultSet.nextRow(spliceRuntimeContext); break; case RIGHT: row = rightResultSet.nextRow(spliceRuntimeContext); break; case MERGED: row = leftResultSet.nextRow(spliceRuntimeContext); if(row==null) row = rightResultSet.nextRow(spliceRuntimeContext); break; default: throw new IllegalStateException("Unknown side state "+ side); } setCurrentRow(row); if(row!=null){ timer.tick(1); }else{ timer.stopTiming(); stopExecutionTime = System.currentTimeMillis(); } return row; } @Override protected void updateStats(OperationRuntimeStats stats) { if(timer!=null){ stats.addMetric(OperationMetric.INPUT_ROWS,timer.getNumEvents()); } } @Override protected int getNumMetrics() { return super.getNumMetrics()+1; } @Override public RowProvider getMapRowProvider(SpliceOperation top, PairDecoder decoder, SpliceRuntimeContext spliceRuntimeContext) throws StandardException, IOException { if(OperationUtils.isInMemory(this)){ // if(leftResultSet instanceof RowOperation && rightResultSet instanceof RowOperation){ spliceRuntimeContext.addPath(resultSetNumber, SpliceRuntimeContext.Side.MERGED); return leftResultSet.getMapRowProvider(top,decoder,spliceRuntimeContext); } SpliceRuntimeContext left = spliceRuntimeContext.copy(); SpliceRuntimeContext right = spliceRuntimeContext.copy(); left.addPath(resultSetNumber, SpliceRuntimeContext.Side.LEFT); right.addPath(resultSetNumber, SpliceRuntimeContext.Side.RIGHT); RowProvider leftRowProvider = leftResultSet.getMapRowProvider(top,decoder,left); RowProvider rightRowProvider = rightResultSet.getMapRowProvider(top,decoder,right); return RowProviders.combine(leftRowProvider, rightRowProvider); } @Override public RowProvider getReduceRowProvider(SpliceOperation top, PairDecoder decoder, SpliceRuntimeContext spliceRuntimeContext, boolean returnDefaultValue) throws StandardException, IOException { return getMapRowProvider(top,decoder,spliceRuntimeContext); } @Override >>>>>>> <<<<<<< public DataSet<LocatedRow> getDataSet(DataSetProcessor dsp) throws StandardException { return firstResultSet.getDataSet().union(secondResultSet.getDataSet()) .map(new SetCurrentLocatedRowFunction<SpliceOperation>(dsp.createOperationContext(this))); ======= public boolean providesRDD() { return leftResultSet.providesRDD() && rightResultSet.providesRDD(); } public JavaRDD<LocatedRow> getRDD(SpliceRuntimeContext spliceRuntimeContext, SpliceOperation top) throws StandardException { SpliceRuntimeContext left = spliceRuntimeContext.copy(); SpliceRuntimeContext right = spliceRuntimeContext.copy(); left.addPath(resultSetNumber, SpliceRuntimeContext.Side.LEFT); right.addPath(resultSetNumber, SpliceRuntimeContext.Side.RIGHT); JavaRDD<LocatedRow> leftRDD = leftResultSet.getRDD(spliceRuntimeContext, top); JavaRDD<LocatedRow> rightRDD = rightResultSet.getRDD(spliceRuntimeContext, top); JavaRDD<LocatedRow> result = leftRDD.union(rightRDD); // RDDUtils.printRDD("Union result", result); return result; >>>>>>> public DataSet<LocatedRow> getDataSet(DataSetProcessor dsp) throws StandardException { return leftResultSet.getDataSet().union(rightResultSet.getDataSet()) .map(new SetCurrentLocatedRowFunction<SpliceOperation>(dsp.createOperationContext(this)));
<<<<<<< import com.splicemachine.derby.ddl.*; import com.splicemachine.derby.impl.job.fk.CreateFkTask; import com.splicemachine.derby.impl.sql.catalog.Splice_DD_Version; import com.splicemachine.derby.impl.sql.execute.operations.*; import com.splicemachine.derby.impl.sql.execute.operations.export.ExportOperation; import com.splicemachine.derby.impl.sql.execute.operations.export.ExportParams; import com.splicemachine.derby.impl.sql.execute.operations.rowcount.RowCountOperation; import com.splicemachine.derby.impl.stats.*; import com.splicemachine.hbase.backup.Backup; import com.splicemachine.hbase.backup.BackupItem; import com.splicemachine.hbase.backup.CreateBackupTask; import com.splicemachine.hbase.backup.PurgeTransactionsTask; import com.splicemachine.hbase.backup.RestoreBackupTask; import com.splicemachine.si.api.TransactionOperations; import com.splicemachine.si.api.TxnView; import de.javakaffee.kryoserializers.UnmodifiableCollectionsSerializer; import org.apache.derby.catalog.types.AggregateAliasInfo; import org.apache.derby.catalog.types.BaseTypeIdImpl; import org.apache.derby.catalog.types.DecimalTypeIdImpl; import org.apache.derby.catalog.types.DefaultInfoImpl; import org.apache.derby.catalog.types.IndexDescriptorImpl; import org.apache.derby.catalog.types.ReferencedColumnsDescriptorImpl; import org.apache.derby.catalog.types.RoutineAliasInfo; import org.apache.derby.catalog.types.RowMultiSetImpl; import org.apache.derby.catalog.types.SynonymAliasInfo; import org.apache.derby.catalog.types.TypeDescriptorImpl; import org.apache.derby.catalog.types.UserDefinedTypeIdImpl; import org.apache.derby.iapi.error.StandardException; import org.apache.derby.iapi.services.io.FormatableArrayHolder; import org.apache.derby.iapi.services.io.FormatableBitSet; import org.apache.derby.iapi.services.io.FormatableHashtable; import org.apache.derby.iapi.services.io.FormatableInstanceGetter; import org.apache.derby.iapi.services.io.FormatableIntHolder; import org.apache.derby.iapi.services.io.FormatableLongHolder; import org.apache.derby.iapi.sql.dictionary.IndexRowGenerator; import org.apache.derby.iapi.sql.dictionary.SchemaDescriptor; import org.apache.derby.iapi.store.raw.ContainerKey; import org.apache.derby.iapi.types.DataTypeDescriptor; import org.apache.derby.iapi.types.SQLBit; import org.apache.derby.iapi.types.SQLBlob; import org.apache.derby.iapi.types.SQLBoolean; import org.apache.derby.iapi.types.SQLChar; import org.apache.derby.iapi.types.SQLClob; import org.apache.derby.iapi.types.SQLDate; import org.apache.derby.iapi.types.SQLDecimal; import org.apache.derby.iapi.types.SQLDouble; import org.apache.derby.iapi.types.SQLInteger; import org.apache.derby.iapi.types.SQLLongVarbit; import org.apache.derby.iapi.types.SQLLongint; import org.apache.derby.iapi.types.SQLLongvarchar; import org.apache.derby.iapi.types.SQLReal; import org.apache.derby.iapi.types.SQLRef; import org.apache.derby.iapi.types.SQLRowId; import org.apache.derby.iapi.types.SQLSmallint; import org.apache.derby.iapi.types.SQLTime; import org.apache.derby.iapi.types.SQLTimestamp; import org.apache.derby.iapi.types.SQLTinyint; import org.apache.derby.iapi.types.SQLVarbit; import org.apache.derby.iapi.types.SQLVarchar; import org.apache.derby.iapi.types.UserType; import org.apache.derby.impl.services.uuid.BasicUUID; import org.apache.derby.impl.sql.CursorInfo; import org.apache.derby.impl.sql.CursorTableReference; import org.apache.derby.impl.sql.GenericColumnDescriptor; import org.apache.derby.impl.sql.GenericParameter; import org.apache.derby.impl.sql.GenericParameterValueSet; import org.apache.derby.impl.sql.GenericResultDescription; import org.apache.derby.impl.sql.GenericStorablePreparedStatement; import org.apache.derby.impl.sql.catalog.DDColumnDependableFinder; import org.apache.derby.impl.sql.catalog.DD_Version; import org.apache.derby.impl.sql.catalog.DDdependableFinder; import org.apache.derby.impl.sql.execute.*; import org.apache.derby.impl.store.access.PC_XenaVersion; ======= >>>>>>>
<<<<<<< ======= import com.splicemachine.derby.utils.SpliceZooKeeperManager; import com.splicemachine.derby.utils.ZkUtils; >>>>>>> <<<<<<< import com.splicemachine.utils.SpliceZooKeeperManager; import com.splicemachine.utils.ZkUtils; ======= import org.apache.hadoop.hbase.ZooKeeperConnectionException; >>>>>>> import com.splicemachine.utils.SpliceZooKeeperManager; import com.splicemachine.utils.ZkUtils; import org.apache.hadoop.hbase.ZooKeeperConnectionException;
<<<<<<< import com.splicemachine.db.iapi.types.*; import com.splicemachine.db.impl.sql.catalog.*; import com.splicemachine.db.impl.sql.execute.IndexColumnOrder; ======= import com.splicemachine.db.iapi.types.DataValueDescriptor; import com.splicemachine.db.iapi.types.NumberDataValue; import com.splicemachine.db.iapi.types.Orderable; import com.splicemachine.db.iapi.types.RowLocation; import com.splicemachine.db.iapi.types.SQLVarchar; import com.splicemachine.db.impl.sql.catalog.BaseDataDictionary; import com.splicemachine.db.impl.sql.catalog.DataDictionaryImpl; import com.splicemachine.db.impl.sql.catalog.SYSCONSTRAINTSRowFactory; import com.splicemachine.db.impl.sql.catalog.SYSFOREIGNKEYSRowFactory; import com.splicemachine.db.impl.sql.catalog.SYSKEYSRowFactory; import com.splicemachine.db.impl.sql.catalog.SYSSCHEMASRowFactory; import com.splicemachine.db.impl.sql.catalog.SystemProcedureGenerator; import com.splicemachine.db.impl.sql.catalog.TabInfoImpl; import com.splicemachine.db.iapi.sql.dictionary.*; import org.apache.hadoop.hbase.client.HTableInterface; import org.apache.hadoop.hbase.util.Bytes; import org.apache.log4j.Logger; import com.splicemachine.constants.SpliceConstants; import com.splicemachine.tools.version.ManifestReader; >>>>>>> import com.splicemachine.db.iapi.types.*; import com.splicemachine.db.impl.sql.catalog.*; import com.splicemachine.db.impl.sql.execute.IndexColumnOrder; import com.splicemachine.db.iapi.types.DataValueDescriptor; import com.splicemachine.db.iapi.types.NumberDataValue; import com.splicemachine.db.iapi.types.Orderable; import com.splicemachine.db.iapi.types.RowLocation; import com.splicemachine.db.iapi.types.SQLVarchar; import com.splicemachine.db.impl.sql.catalog.BaseDataDictionary; import com.splicemachine.db.impl.sql.catalog.DataDictionaryImpl; import com.splicemachine.db.impl.sql.catalog.SYSCONSTRAINTSRowFactory; import com.splicemachine.db.impl.sql.catalog.SYSFOREIGNKEYSRowFactory; import com.splicemachine.db.impl.sql.catalog.SYSKEYSRowFactory; import com.splicemachine.db.impl.sql.catalog.SYSSCHEMASRowFactory; import com.splicemachine.db.impl.sql.catalog.SystemProcedureGenerator; import com.splicemachine.db.impl.sql.catalog.TabInfoImpl; import com.splicemachine.db.iapi.sql.dictionary.*; import org.apache.hadoop.hbase.client.HTableInterface; import org.apache.hadoop.hbase.util.Bytes; import org.apache.log4j.Logger; import com.splicemachine.constants.SpliceConstants; import com.splicemachine.tools.version.ManifestReader; <<<<<<< private Properties defaultProperties; ======= private SchemaDescriptor backupSchemaDesc; private static final String BACKUP_SCHEMA_UUID = "2d832584-cb7c-48cb-a8c6-6e1a397bb089"; >>>>>>> private SchemaDescriptor backupSchemaDesc; private static final String BACKUP_SCHEMA_UUID = "2d832584-cb7c-48cb-a8c6-6e1a397bb089"; private Properties defaultProperties; <<<<<<< //create XPLAIN tables createXplainTables(tc); //create the Statistics tables createStatisticsTables(tc); ======= createFujiTables(tc); createLassenTables(tc); >>>>>>> createFujiTables(tc); createLassenTables(tc); //create the Statistics tables createStatisticsTables(tc);
<<<<<<< import com.splicemachine.db.impl.sql.execute.ValueRow; ======= import com.splicemachine.db.iapi.types.RowLocation; import org.apache.hadoop.hbase.client.Scan; >>>>>>> import com.splicemachine.db.impl.sql.execute.ValueRow; <<<<<<< import java.util.Collections; import java.util.Iterator; import java.util.List; ======= import java.util.*; import java.util.concurrent.Callable; >>>>>>> import java.util.Collections; import java.util.List; import java.util.*; <<<<<<< ======= private TriggerInfo triggerInfo; private TriggerEventActivator triggerActivator; >>>>>>> private TriggerInfo triggerInfo; private TriggerEventActivator triggerActivator; <<<<<<< ======= List<SpliceOperation> opStack = getOperationStack(); boolean hasScan = false; for(SpliceOperation op:opStack){ if(this!=op&&op.getNodeTypes().contains(NodeType.REDUCE)||op instanceof ScanOperation){ hasScan =true; break; } } isScan = hasScan; initTriggerActivator(context); startExecutionTime = System.currentTimeMillis(); >>>>>>> initTriggerActivator(context);
<<<<<<< import com.splicemachine.utils.SpliceZooKeeperManager; ======= import com.splicemachine.derby.utils.SpliceUtils; import com.splicemachine.derby.utils.SpliceZooKeeperManager; >>>>>>> import com.splicemachine.derby.utils.SpliceUtils; import com.splicemachine.utils.SpliceZooKeeperManager; <<<<<<< String taskId = getTaskId(); RecoverableZooKeeper zooKeeper =zkManager.getRecoverableZooKeeper(); taskId = zooKeeper.create(taskId,payload, ZooDefs.Ids.OPEN_ACL_UNSAFE, CreateMode.PERSISTENT_SEQUENTIAL); setTaskId(taskId); byte[] statusData = statusToBytes(); statusNode = zooKeeper.create(taskId+"/status",statusData,ZooDefs.Ids.OPEN_ACL_UNSAFE, CreateMode.EPHEMERAL); checkNotCancelled(); } catch (IOException e) { throw new ExecutionException(e); } catch (InterruptedException e) { throw new ExecutionException(e); } catch (KeeperException e) { throw new ExecutionException(e); ======= RecoverableZooKeeper zooKeeper =zkManager.getRecoverableZooKeeper(); taskId = zooKeeper.create(taskId,payload, ZooDefs.Ids.OPEN_ACL_UNSAFE, CreateMode.PERSISTENT); setTaskId(taskId); byte[] statusData = statusToBytes(); zooKeeper.create(taskId+"/status",statusData,ZooDefs.Ids.OPEN_ACL_UNSAFE, CreateMode.EPHEMERAL); } catch (IOException e) { throw new ExecutionException(e); } catch (InterruptedException e) { throw new ExecutionException(e); } catch (KeeperException e) { throw new ExecutionException(e); } }else{ getTaskStatus().setStatus(Status.PENDING); >>>>>>> String taskId = getTaskId(); RecoverableZooKeeper zooKeeper =zkManager.getRecoverableZooKeeper(); taskId = zooKeeper.create(taskId,payload, ZooDefs.Ids.OPEN_ACL_UNSAFE, CreateMode.PERSISTENT_SEQUENTIAL); setTaskId(taskId); byte[] statusData = statusToBytes(); zooKeeper.create(taskId+"/status",statusData,ZooDefs.Ids.OPEN_ACL_UNSAFE, CreateMode.EPHEMERAL); checkNotCancelled(); } catch (IOException e) { throw new ExecutionException(e); } catch (InterruptedException e) { throw new ExecutionException(e); } catch (KeeperException e) { throw new ExecutionException(e); }
<<<<<<< boolean skipWAL, boolean rollforward) throws IOException{ // if (LOG.isTraceEnabled()) LOG.trace(String.format("processInternal: table = %s, txnId = %s", table.toString(), txn.getTxnId())); ======= boolean skipWAL) throws IOException{ >>>>>>> boolean skipWAL, boolean rollforward) throws IOException{
<<<<<<< private static final double CONTROL_SIDE_THRESHOLD = 1E20; // based on a TPCC1000 run on an 8 node cluster ======= public static final DataSetProcessor hregionDataSetProcessor = new HregionDataSetProcessor(); private static final double CONTROL_SIDE_THRESHOLD = 1e5; // based on a TPCC1000 run on an 8 node cluster >>>>>>> public static final DataSetProcessor hregionDataSetProcessor = new HregionDataSetProcessor(); private static final double CONTROL_SIDE_THRESHOLD = 1E20; // based on a TPCC1000 run on an 8 node cluster
<<<<<<< import com.google.common.collect.Lists; ======= import com.google.common.collect.ImmutableList; import com.splicemachine.db.iapi.reference.SQLState; import com.splicemachine.db.impl.sql.compile.ExportNode; import com.splicemachine.derby.hbase.SpliceObserverInstructions; >>>>>>> import com.splicemachine.db.iapi.reference.SQLState; import com.splicemachine.db.impl.sql.compile.ExportNode;
<<<<<<< import com.splicemachine.db.impl.sql.execute.BaseActivation; ======= import com.splicemachine.db.iapi.sql.execute.ExecIndexRow; import com.splicemachine.derby.iapi.sql.execute.SpliceNoPutResultSet; >>>>>>> import com.splicemachine.db.impl.sql.execute.BaseActivation; import com.splicemachine.db.iapi.sql.execute.ExecIndexRow; import com.splicemachine.derby.iapi.sql.execute.SpliceNoPutResultSet; <<<<<<< @Override public ExecIndexRow getStartPosition() throws StandardException { return scanInformation.getStartPosition(); } ======= @Override public boolean pushedToServer() { return false; } @Override public ExecIndexRow getStartPosition() throws StandardException { return scanInformation.getStartPosition(); } >>>>>>> @Override public ExecIndexRow getStartPosition() throws StandardException { return scanInformation.getStartPosition(); }
<<<<<<< ======= List<SpliceOperation> opStack = getOperationStack(); boolean hasScan = false; for(SpliceOperation op:opStack){ if(this!=op&&op.getNodeTypes().contains(NodeType.REDUCE)||op instanceof ScanOperation){ hasScan =true; break; } } isScan = hasScan; WriteCursorConstantOperation constantAction = (WriteCursorConstantOperation) writeInfo.getConstantAction(); TriggerInfo triggerInfo = constantAction.getTriggerInfo(); if(this.triggerHandler == null && triggerInfo != null) { this.triggerHandler = new TriggerHandler( context, triggerInfo, writeInfo, getActivation(), getBeforeEvent(getClass()), getAfterEvent(getClass()) ); } startExecutionTime = System.currentTimeMillis(); >>>>>>> <<<<<<< ======= @Override public ExecRow getNextSinkRow(SpliceRuntimeContext spliceRuntimeContext) throws StandardException, IOException { if(timer==null){ timer = spliceRuntimeContext.newTimer(); } timer.startTiming(); ExecRow row = source.nextRow(spliceRuntimeContext); if(row!=null){ timer.tick(1); currentRow = row; }else{ timer.stopTiming(); stopExecutionTime = System.currentTimeMillis(); } return row; } @Override public ExecRow nextRow(SpliceRuntimeContext spliceRuntimeContext) throws StandardException { throw new UnsupportedOperationException("Write Operations do not produce rows."); } @Override protected void updateStats(OperationRuntimeStats stats) { if (timer != null) { //inputs rows are the same as output rows by default (although Update may be different) stats.addMetric(OperationMetric.INPUT_ROWS, timer.getNumEvents()); } } public TriggerHandler getTriggerHandler() { return triggerHandler; } /** * When DMLWriteOperation has no scan in the operation tree (insert VALUES, for example) it tells the framework * that it is not sinking. Then this RowProvider is used in executeScan. It ultimately just calls getNextNextSinkRow * from the enclosing operation and sinks the results locally (see SourceRowProvider). */ private class ModifiedRowProvider extends SingleScanRowProvider { private volatile boolean isOpen; private long rowsModified = 0; private RowProvider rowProvider; private SpliceObserverInstructions spliceObserverInstructions; @Override public JobResults shuffleRows(SpliceObserverInstructions instructions, Callable<Void>... postCompleteTasks) throws StandardException, IOException { /* * Transactional Information: * * When we execute a statement like this, we have a situation. Our root * transaction is the transaction for the overall transaction (not a * statement specific one). This means that, if anything happens here, * we need to rollback the overall transaction. * * However, there are two problems with this. Firstly, if auto-commit * is off, then a user may choose to commit that global transaction * no matter what we do, which could result in data corruption. Secondly, * if we automatically rollback the global transaction, then we risk * rolling back many statements which were executed in parallel. This * is clearly very bad in both cases, so we can't rollback the * global transaction. * * Instead, we create a child transaction, which we can roll back * safely. * * -sf- In past versions of Splice, we would create the child transaction * directly right here, and then manually commit/rollback as needed. However, * DB-1706 implements Derby savepoints, which the derby query parser automatically * creates during any write operation. Thus, we no longer have to explicitly * create or manage transactions here, as it is transparently managed * by Derby for us. */ if(triggerHandler != null) { triggerHandler.fireBeforeStatementTriggers(); } JobResults jobStats = rowProvider.shuffleRows(instructions, postCompleteTasks); long i = 0; for (TaskStats stat : jobStats.getJobStats().getTaskStats()) { i = i + stat.getTotalRowsWritten(); } rowsModified = i; if(triggerHandler != null) { triggerHandler.fireAfterStatementTriggers(); } return jobStats; } public ModifiedRowProvider(RowProvider rowProvider, SpliceObserverInstructions spliceObserverInstructions) { this.rowProvider = rowProvider; this.spliceObserverInstructions = spliceObserverInstructions; } @Override public boolean hasNext() { return false; } @Override public ExecRow next() { return null; } //no-op @Override public void reportStats(long statementId, long operationId, long taskId, String xplainSchema,String regionName) { } @Override public IOStats getIOStats() { return Metrics.noOpIOStats(); } @Override public void open() throws StandardException { SpliceLogUtils.trace(LOG, "open"); this.isOpen = true; if (!getNodeTypes().contains(NodeType.REDUCE)) { if (rowProvider != null) rowProvider.open(); else if (operationInformation.isRuntimeStatisticsEnabled()) { /* Cache query plan text for source, before it gets blown away */ /* savedSource nulled after run time statistics generation */ savedSource = source; } //delegate to shuffle, since that will do the proper thing try { shuffleRows(spliceObserverInstructions); } catch (IOException e) { throw Exceptions.parseException(e); } } } @Override public void close() throws StandardException{ rowsModified = 0; SpliceLogUtils.trace(LOG, "close in modifiedProvider for Delete/Insert/Update"); if (! this.isOpen) return; if (isTopResultSet && activation.getLanguageConnectionContext().getRunTimeStatisticsMode() && !activation.getLanguageConnectionContext().getStatementContext().getStatementWasInvalidated()) endExecutionTime = getCurrentTimeMillis(); this.isOpen = false; try { if (rowProvider != null) rowProvider.close(); else source.close(); } catch (IOException e) { throw Exceptions.parseException(e); } } @Override public RowLocation getCurrentRowLocation() { return null; } @Override public Scan toScan() { return null; } @Override public byte[] getTableName() { return null; } @Override public int getModifiedRowCount() { return (int)(rowsModified+rowsSunk); } @Override public String toString(){ return "ModifiedRowProvider"; } @Override public SpliceRuntimeContext getSpliceRuntimeContext() { return spliceRuntimeContext; } } @Override public int modifiedRowCount() { return modifiedProvider.getModifiedRowCount(); } public SpliceOperation getSource() { return this.source; } @Override >>>>>>>
<<<<<<< import com.splicemachine.db.iapi.sql.dictionary.TriggerDescriptor; import com.splicemachine.derby.ddl.*; import com.splicemachine.derby.impl.job.coprocessor.TaskFutureContext; import com.splicemachine.derby.impl.job.fk.FkTask; import com.splicemachine.derby.impl.sql.catalog.Splice_DD_Version; import com.splicemachine.derby.impl.sql.execute.operations.*; import com.splicemachine.derby.impl.sql.execute.operations.batchonce.BatchOnceOperation; import com.splicemachine.derby.impl.sql.execute.operations.export.ExportOperation; import com.splicemachine.derby.impl.sql.execute.operations.export.ExportParams; import com.splicemachine.derby.impl.sql.execute.operations.RowCountOperation; import com.splicemachine.hbase.backup.Backup; import com.splicemachine.hbase.backup.BackupItem; import com.splicemachine.hbase.backup.CreateBackupTask; import com.splicemachine.hbase.backup.CreateIncrementalBackupTask; import com.splicemachine.hbase.backup.PurgeTransactionsTask; import com.splicemachine.hbase.backup.RestoreBackupTask; import com.splicemachine.pipeline.writecontextfactory.FKConstraintInfo; import com.splicemachine.si.api.TransactionOperations; import com.splicemachine.si.api.TxnView; import de.javakaffee.kryoserializers.UnmodifiableCollectionsSerializer; import com.splicemachine.db.catalog.types.AggregateAliasInfo; import com.splicemachine.db.catalog.types.BaseTypeIdImpl; import com.splicemachine.db.catalog.types.DecimalTypeIdImpl; import com.splicemachine.db.catalog.types.DefaultInfoImpl; import com.splicemachine.db.catalog.types.IndexDescriptorImpl; import com.splicemachine.db.catalog.types.ReferencedColumnsDescriptorImpl; import com.splicemachine.db.catalog.types.RoutineAliasInfo; import com.splicemachine.db.catalog.types.RowMultiSetImpl; import com.splicemachine.db.catalog.types.SynonymAliasInfo; import com.splicemachine.db.catalog.types.TypeDescriptorImpl; import com.splicemachine.db.catalog.types.UserDefinedTypeIdImpl; ======= import com.splicemachine.db.catalog.types.*; >>>>>>> import com.splicemachine.db.iapi.sql.dictionary.TriggerDescriptor; import com.splicemachine.derby.ddl.*; import com.splicemachine.derby.impl.job.coprocessor.TaskFutureContext; import com.splicemachine.derby.impl.job.fk.FkTask; import com.splicemachine.derby.impl.sql.catalog.Splice_DD_Version; import com.splicemachine.derby.impl.sql.execute.operations.*; import com.splicemachine.derby.impl.sql.execute.operations.batchonce.BatchOnceOperation; import com.splicemachine.derby.impl.sql.execute.operations.export.ExportOperation; import com.splicemachine.derby.impl.sql.execute.operations.export.ExportParams; import com.splicemachine.derby.impl.sql.execute.operations.RowCountOperation; import com.splicemachine.hbase.backup.Backup; import com.splicemachine.hbase.backup.BackupItem; import com.splicemachine.hbase.backup.CreateBackupTask; import com.splicemachine.hbase.backup.CreateIncrementalBackupTask; import com.splicemachine.hbase.backup.PurgeTransactionsTask; import com.splicemachine.hbase.backup.RestoreBackupTask; import com.splicemachine.pipeline.writecontextfactory.FKConstraintInfo; import com.splicemachine.si.api.TransactionOperations; import com.splicemachine.si.api.TxnView; import de.javakaffee.kryoserializers.UnmodifiableCollectionsSerializer; import com.splicemachine.db.catalog.types.AggregateAliasInfo; import com.splicemachine.db.catalog.types.BaseTypeIdImpl; import com.splicemachine.db.catalog.types.DecimalTypeIdImpl; import com.splicemachine.db.catalog.types.DefaultInfoImpl; import com.splicemachine.db.catalog.types.IndexDescriptorImpl; import com.splicemachine.db.catalog.types.ReferencedColumnsDescriptorImpl; import com.splicemachine.db.catalog.types.RoutineAliasInfo; import com.splicemachine.db.catalog.types.RowMultiSetImpl; import com.splicemachine.db.catalog.types.SynonymAliasInfo; import com.splicemachine.db.catalog.types.TypeDescriptorImpl; import com.splicemachine.db.catalog.types.UserDefinedTypeIdImpl; <<<<<<< import com.splicemachine.derby.impl.sql.execute.LazyDataValueDescriptor; import com.splicemachine.derby.impl.sql.execute.LazyNumberDataValueDescriptor; import com.splicemachine.derby.impl.sql.execute.LazyStringDataValueDescriptor; import com.splicemachine.derby.impl.sql.execute.LazyTimestampDataValueDescriptor; ======= import com.splicemachine.derby.impl.job.index.PopulateIndexTask; import com.splicemachine.derby.impl.job.operation.SinkTask; import com.splicemachine.derby.impl.load.ColumnContext; import com.splicemachine.derby.impl.load.FileImportReader; import com.splicemachine.derby.impl.load.ImportContext; import com.splicemachine.derby.impl.load.ImportTask; import com.splicemachine.derby.impl.sql.catalog.Splice_DD_Version; >>>>>>> import com.splicemachine.derby.impl.sql.execute.LazyDataValueDescriptor; <<<<<<< instance.register(LazyTimestampDataValueDescriptor.class,EXTERNALIZABLE_SERIALIZER,154); //instance.register(ActivationSerializer.OperationResultSetStorage.class,EXTERNALIZABLE_SERIALIZER,155); ======= instance.register(LazyTimestamp.class,EXTERNALIZABLE_SERIALIZER,154); instance.register(ActivationSerializer.OperationResultSetStorage.class,EXTERNALIZABLE_SERIALIZER,155); >>>>>>> instance.register(LazyTimestamp.class,EXTERNALIZABLE_SERIALIZER,154); instance.register(ActivationSerializer.OperationResultSetStorage.class,EXTERNALIZABLE_SERIALIZER,155); <<<<<<< instance.register(ScrollInsensitiveOperation.class, EXTERNALIZABLE_SERIALIZER, 263); instance.register(VTIOperation.class, EXTERNALIZABLE_SERIALIZER, 264); ======= instance.register(LazyVarchar.class, EXTERNALIZABLE_SERIALIZER, 263); instance.register(LazyChar.class, EXTERNALIZABLE_SERIALIZER, 264); instance.register(LazyClob.class, EXTERNALIZABLE_SERIALIZER, 265); instance.register(LazyLongVarchar.class, EXTERNALIZABLE_SERIALIZER, 266); instance.register(LazyDouble.class, EXTERNALIZABLE_SERIALIZER,267); instance.register(LazyDecimal.class, EXTERNALIZABLE_SERIALIZER,268); >>>>>>> instance.register(ScrollInsensitiveOperation.class, EXTERNALIZABLE_SERIALIZER, 263); instance.register(VTIOperation.class, EXTERNALIZABLE_SERIALIZER, 264); instance.register(LazyVarchar.class, EXTERNALIZABLE_SERIALIZER, 265); instance.register(LazyChar.class, EXTERNALIZABLE_SERIALIZER, 266); instance.register(LazyClob.class, EXTERNALIZABLE_SERIALIZER, 267); instance.register(LazyLongVarchar.class, EXTERNALIZABLE_SERIALIZER, 268); instance.register(LazyDouble.class, EXTERNALIZABLE_SERIALIZER,269); instance.register(LazyDecimal.class, EXTERNALIZABLE_SERIALIZER,270);
<<<<<<< LoadingTask loader = new LoadingTask(); //submit a task to load any outstanding tasks from the zookeeper region queue try { doSubmit(loader,rce); } catch (IOException e) { throw new RuntimeException(e); } ======= >>>>>>>
<<<<<<< //Let the notification react on notification displayed state so it can get the displayed notification identifier oneSignalNotification.onNotificationDisplayed(fetLifeApplication, displayedResult.notificationId); ======= oneSignalNotification.onNotificationDisplayed(fetLifeApplication, displayedResult.androidNotificationId); >>>>>>> //Let the notification react on notification displayed state so it can get the displayed notification identifier oneSignalNotification.onNotificationDisplayed(fetLifeApplication, displayedResult.androidNotificationId);
<<<<<<< import com.splicemachine.derby.impl.job.TransactionalTask; ======= import com.splicemachine.derby.impl.job.ZkTask; >>>>>>> import com.splicemachine.derby.impl.job.ZkTask; <<<<<<< ======= >>>>>>> <<<<<<< public abstract class AbstractImportTask extends TransactionalTask { ======= public abstract class AbstractImportTask extends ZkTask { >>>>>>> public abstract class AbstractImportTask extends ZkTask { <<<<<<< private String buildTaskId(HRegion region) { return zkSpliceTaskPath+"/"+region.getTableDesc().getNameAsString()+"/"+region.getRegionNameAsString()+"/importTask-"; } ======= >>>>>>>
<<<<<<< public NoPutResultSet getRaDependentTableScanResultSet( Activation activation, long conglomId, int scociItem, GeneratedMethod resultRowAllocator, int resultSetNumber, GeneratedMethod startKeyGetter, int startSearchOperator, GeneratedMethod stopKeyGetter, int stopSearchOperator, boolean sameStartStopPosition, String qualifiersField, String tableName, String userSuppliedOptimizerOverrides, String indexName, boolean isConstraint, boolean forUpdate, int colRefItem, int indexColItem, int lockMode, boolean tableLocked, int isolationLevel, boolean oneRowScan, double optimizerEstimatedRowCount, double optimizerEstimatedCost, String parentResultSetId, long fkIndexConglomId, int fkColArrayItem, int rltItem) throws StandardException { throw new UnsupportedOperationException("Dependant operation is not implemented"); } @Override ======= >>>>>>>
<<<<<<< splitBlockSize = config.getInt(SPLIT_BLOCK_SIZE,DEFAULT_SPLIT_BLOCK_SIZE); ======= controlSideCostThreshold = SpliceConstants.config.getDouble(CONTROL_SIDE_COST_THRESHOLD, DEFAULT_CONTROL_SIDE_COST_THRESHOLD); controlSideRowCountThreshold = SpliceConstants.config.getDouble(CONTROL_SIDE_ROWCOUNT_THRESHOLD, DEFAULT_CONTROL_SIDE_ROWCOUNT_THRESHOLD); >>>>>>> splitBlockSize = config.getInt(SPLIT_BLOCK_SIZE,DEFAULT_SPLIT_BLOCK_SIZE); controlSideCostThreshold = SpliceConstants.config.getDouble(CONTROL_SIDE_COST_THRESHOLD, DEFAULT_CONTROL_SIDE_COST_THRESHOLD); controlSideRowCountThreshold = SpliceConstants.config.getDouble(CONTROL_SIDE_ROWCOUNT_THRESHOLD, DEFAULT_CONTROL_SIDE_ROWCOUNT_THRESHOLD);
<<<<<<< ======= import com.splicemachine.derby.iapi.sql.execute.SpliceRuntimeContext; import com.splicemachine.derby.impl.SpliceMethod; >>>>>>> import com.splicemachine.derby.iapi.sql.execute.SpliceRuntimeContext; import com.splicemachine.derby.impl.SpliceMethod; <<<<<<< protected GeneratedMethod emptyRowFun; ======= protected SpliceMethod<ExecRow> emptyRowFun; protected Qualifier[][] qualifierProbe; >>>>>>> protected SpliceMethod<ExecRow> emptyRowFun; protected Qualifier[][] qualifierProbe; <<<<<<< SpliceLogUtils.trace(LOG, "init"); super.init(context); emptyRightRowsReturned = 0; emptyRowFun = (emptyRowFunMethodName == null) ? null : context.getPreparedStatement().getActivationClass().getMethod(emptyRowFunMethodName); ======= SpliceLogUtils.trace(LOG, "init"); super.init(context); emptyRightRowsReturned = 0; emptyRowFun = (emptyRowFunMethodName == null) ? null : new SpliceMethod<ExecRow>(emptyRowFunMethodName,activation); >>>>>>> SpliceLogUtils.trace(LOG, "init"); super.init(context); emptyRightRowsReturned = 0; emptyRowFun = (emptyRowFunMethodName == null) ? null : new SpliceMethod<ExecRow>(emptyRowFunMethodName,activation); <<<<<<< ======= @Override protected NestedLoopIterator createNestedLoopIterator(ExecRow leftRow, boolean hash, SpliceRuntimeContext spliceRuntimeContext, boolean showStatementInfo, boolean cloneResults) throws StandardException, IOException { return new NestedLoopLeftOuterIterator(leftRow, hash, spliceRuntimeContext, showStatementInfo, cloneResults); } private class NestedLoopLeftOuterIterator extends NestedLoopIterator{ private boolean seenRow = false; NestedLoopLeftOuterIterator(ExecRow leftRow, boolean hash,SpliceRuntimeContext context, boolean showStatementInfo, boolean cloneResults) throws StandardException, IOException { super(leftRow, hash, true, rightResultSetUniqueSequenceID, context, showStatementInfo, cloneResults); } @Override protected void nonNullRight() { seenRow=true; } @Override protected ExecRow getEmptyRightRow() throws StandardException { if (seenRow) { SpliceLogUtils.trace(LOG, "already has seen row and no right result"); probeResultSet.setCurrentRow(null); emptyRightRowsReturned++; close(); return null; } rightRow = (ExecRow) emptyRowFun.invoke(); seenRow=true; return rightRow; } } >>>>>>>
<<<<<<< public ConglomerateDescriptor getBaseConglomerateDescriptor() { return getTableColumnDescriptor()==null?null:getTableColumnDescriptor().getBaseConglomerateDescriptor(); } ======= >>>>>>> public ConglomerateDescriptor getBaseConglomerateDescriptor() { return getTableColumnDescriptor()==null?null:getTableColumnDescriptor().getBaseConglomerateDescriptor(); }
<<<<<<< import com.jcabi.github.Repo; import com.jcabi.github.RepoCommit; ======= import com.jcabi.github.Releases; >>>>>>> import com.jcabi.github.Releases; import com.jcabi.github.Repo; import com.jcabi.github.RepoCommit; <<<<<<< import java.text.DateFormat; import java.text.SimpleDateFormat; import java.util.Collection; import java.util.Date; import java.util.LinkedList; import java.util.Locale; import java.util.TimeZone; ======= import java.util.ResourceBundle; >>>>>>> import java.text.DateFormat; import java.text.SimpleDateFormat; import java.util.Collection; import java.util.Date; import java.util.LinkedList; import java.util.Locale; import java.util.ResourceBundle; import java.util.TimeZone; <<<<<<< final Repo repo = issue.repo(); final Date prev = this.previous(repo); final Release.Smart release = new Release.Smart( repo.releases().create(tag) ); release.name(issue.title()); release.body(this.body(repo, prev, release.publishedAt())); Logger.info(this, "tag %s commented", tag); ======= final Releases.Smart rels = new Releases.Smart(issue.repo().releases()); if (rels.exists(tag)) { final Release.Smart rel = new Release.Smart(rels.find(tag)); issue.comments().post( String.format( CommentsTag.PHRASES.getString("CommentsTag.duplicate"), tag ) ); rel.body( String.format( "%s\n\nSee also #%d", rel.body(), issue.number() ) ); Logger.info(this, "duplicate tag %s commented", tag); } else { final Release.Smart rel = new Release.Smart(rels.create(tag)); rel.name(issue.title()); rel.body(String.format("See #%d", issue.number())); Logger.info(this, "tag %s created and commented", tag); } >>>>>>> final Releases.Smart rels = new Releases.Smart(issue.repo().releases()); if (rels.exists(tag)) { final Release.Smart rel = new Release.Smart(rels.find(tag)); issue.comments().post( String.format( CommentsTag.PHRASES.getString("CommentsTag.duplicate"), tag ) ); rel.body( String.format( "%s\n\nSee also #%d", rel.body(), issue.number() ) ); Logger.info(this, "duplicate tag %s commented", tag); } else { final Repo repo = issue.repo(); final Date prev = this.previous(repo); final Release.Smart rel = new Release.Smart(rels.create(tag)); rel.name(issue.title()); rel.body(this.body(repo, prev, rel.publishedAt())); Logger.info(this, "tag %s created and commented", tag); }
<<<<<<< import org.json.JSONObject; /** * Inbound and extension point for OneSignal notification library to react on user interaction when user clciked on a notification */ ======= >>>>>>> /** * Inbound and extension point for OneSignal notification library to react on user interaction when user clciked on a notification */
<<<<<<< if ("places".equals(uriSegments.get(0)) && "settings".equals(currentUriSegments.get(0))) { return true; } ======= if ("search".equals(uriSegments.get(0)) && "search".equals(currentUriSegments.get(0))) { if (uriSegments.size() < 2) { return currentUriSegments.size() >= 2; } else if (currentUriSegments.size() < 2) { return true; } else { return !uriSegments.get(1).equalsIgnoreCase(currentUriSegments.get(1)); } } >>>>>>> if ("places".equals(uriSegments.get(0)) && "settings".equals(currentUriSegments.get(0))) { return true; } if ("search".equals(uriSegments.get(0)) && "search".equals(currentUriSegments.get(0))) { if (uriSegments.size() < 2) { return currentUriSegments.size() >= 2; } else if (currentUriSegments.size() < 2) { return true; } else { return !uriSegments.get(1).equalsIgnoreCase(currentUriSegments.get(1)); } }
<<<<<<< import com.bitlove.fetlife.model.pojos.SharedProfile; ======= import com.bitlove.fetlife.model.pojos.FriendSuggestion; import com.bitlove.fetlife.model.pojos.FriendSuggestion_Table; import com.bitlove.fetlife.model.pojos.Member; >>>>>>> import com.bitlove.fetlife.model.pojos.SharedProfile; import com.bitlove.fetlife.model.pojos.Member; <<<<<<< //**** //Action names for Api service calls //*** ======= public static final String ACTION_APICALL_MEMBER = "com.bitlove.fetlife.action.apicall.member"; >>>>>>> //**** //Action names for Api service calls //*** public static final String ACTION_APICALL_MEMBER = "com.bitlove.fetlife.action.apicall.member"; <<<<<<< //Reference holder for the action that is being processed ======= private static final int MAX_SUBJECT_LENGTH = 36; private static final String SUBJECT_SHORTENED_SUFFIX = "\u2026"; >>>>>>> //Reference holder for the action that is being processed private static final int MAX_SUBJECT_LENGTH = 36; private static final String SUBJECT_SHORTENED_SUFFIX = "\u2026"; <<<<<<< } else if (action != ACTION_APICALL_LOGON_USER && getFetLifeApplication().getFetLifeService().getLastResponseCode() == 403) { //If the result is failed due to Authentication or Authorization issue, let's try to refresh the token as it is most probably expired ======= } else if (action != ACTION_APICALL_LOGON_USER && (lastResponseCode == 401 || lastResponseCode == 403)) { >>>>>>> } else if (action != ACTION_APICALL_LOGON_USER && (lastResponseCode == 401 || lastResponseCode == 403)) { //If the result is failed due to Authentication or Authorization issue, let's try to refresh the token as it is most probably expired <<<<<<< private boolean setMessagesRead(String[] params) throws IOException { String conversationId = params[0]; String[] messageIds = Arrays.copyOfRange(params, 1, params.length); Call<ResponseBody> setMessagesReadCall = getFetLifeApi().setMessagesRead(FetLifeService.AUTH_HEADER_PREFIX + getAccessToken(), conversationId, messageIds); Response<ResponseBody> response = setMessagesReadCall.execute(); return response.isSuccess(); } ======= String message = startMessage.getBody(); String subject = message; if (message.length() > MAX_SUBJECT_LENGTH) { subject = subject.substring(0, MAX_SUBJECT_LENGTH-SUBJECT_SHORTENED_SUFFIX.length()).trim().concat(SUBJECT_SHORTENED_SUFFIX); } Call<Conversation> postConversationCall = getFetLifeApi().postConversation(FetLifeService.AUTH_HEADER_PREFIX + getAccessToken(), pendingConversation.getMemberId(), subject, message); Response<Conversation> postConversationResponse = postConversationCall.execute(); if (postConversationResponse.isSuccess()) { pendingConversation.delete(); >>>>>>> private boolean setMessagesRead(String[] params) throws IOException { String conversationId = params[0]; String[] messageIds = Arrays.copyOfRange(params, 1, params.length); Call<ResponseBody> setMessagesReadCall = getFetLifeApi().setMessagesRead(FetLifeService.AUTH_HEADER_PREFIX + getAccessToken(), conversationId, messageIds); Response<ResponseBody> response = setMessagesReadCall.execute(); return response.isSuccess(); } <<<<<<< private boolean retrieveFriends(String[] params) throws IOException { ======= private String getAccessToken() { User currentUser = getFetLifeApplication().getUserSessionManager().getCurrentUser(); if (currentUser == null) { return null; } return currentUser.getAccessToken(); } private boolean getMember(String... params) throws IOException { Call<Member> getMemberCall = getFetLifeApi().getMember(FetLifeService.AUTH_HEADER_PREFIX + getAccessToken(), params[0]); Response<Member> getMemberResponse = getMemberCall.execute(); if (getMemberResponse.isSuccess()) { getMemberResponse.body().save(); return true; } else { return false; } } private boolean retrieveFriends(String[] params) throws IOException { >>>>>>> private String getAccessToken() { User currentUser = getFetLifeApplication().getUserSessionManager().getCurrentUser(); if (currentUser == null) { return null; } return currentUser.getAccessToken(); } private boolean getMember(String... params) throws IOException { Call<Member> getMemberCall = getFetLifeApi().getMember(FetLifeService.AUTH_HEADER_PREFIX + getAccessToken(), params[0]); Response<Member> getMemberResponse = getMemberCall.execute(); if (getMemberResponse.isSuccess()) { getMemberResponse.body().save(); return true; } else { return false; } } private boolean retrieveFriends(String[] params) throws IOException {
<<<<<<< @RequestProcessing(value = PREFERENCE_URI_PREFIX + "oss", method = HttpMethod.PUT) public void updateOss(final RequestContext context) { ======= public void updateQiniu(final RequestContext context) { >>>>>>> public void updateOss(final RequestContext context) {
<<<<<<< import com.bitlove.fetlife.view.screen.BaseActivity; import com.bitlove.fetlife.webapp.navigation.WebAppNavigation; import com.bitlove.fetlife.webapp.screen.FetLifeWebViewActivity; ======= import com.bitlove.fetlife.view.screen.BaseActivity; import com.bitlove.fetlife.view.screen.resource.ConversationsActivity; import com.bitlove.fetlife.webapp.navigation.WebAppNavigation; import com.bitlove.fetlife.webapp.screen.FetLifeWebViewActivity; >>>>>>> import com.bitlove.fetlife.webapp.navigation.WebAppNavigation; import com.bitlove.fetlife.webapp.screen.FetLifeWebViewActivity;
<<<<<<< ======= import svenhjol.meson.helper.ItemNBTHelper; import vazkii.quark.base.Quark; import vazkii.quark.base.module.ModuleLoader; import vazkii.quark.vanity.item.RuneItem; import vazkii.quark.vanity.module.ColorRunesModule; >>>>>>>
<<<<<<< import java.util.HashMap; import java.util.List; import java.util.Map; ======= import java.util.stream.Collectors; >>>>>>> import java.util.HashMap; import java.util.Map; import java.util.stream.Collectors; <<<<<<< private static Map<Class<?>, List<Class<? extends JsonNode>>> allowedJsonTypes = null; ======= private static String getJsonValueType(Class<? extends JsonNode> node) { String type = node.getSimpleName(); return type.endsWith("Node") ? type.substring(0, type.length() - 4) : type; } private static Multimap<Class<?>, Class<? extends JsonNode>> allowedJsonTypes = null; >>>>>>> private static String getJsonValueType(Class<? extends JsonNode> node) { String type = node.getSimpleName(); return type.endsWith("Node") ? type.substring(0, type.length() - 4) : type; } private static Map<Class<?>, List<Class<? extends JsonNode>>> allowedJsonTypes = null;
<<<<<<< import org.aksw.rdfunit.elements.interfaces.TestCase; ======= >>>>>>> import org.aksw.rdfunit.elements.interfaces.TestCase; <<<<<<< ======= /** {@inheritDoc} */ @Override protected void collectInitializationErrors(List<Throwable> errors) { super.collectInitializationErrors(errors); verifySchemaAnnotation(errors); verifyTestInputAnnotatedMethods(errors); } >>>>>>> /** {@inheritDoc} */ @Override protected void collectInitializationErrors(List<Throwable> errors) { super.collectInitializationErrors(errors); verifySchemaAnnotation(errors); verifyTestInputAnnotatedMethods(errors); }
<<<<<<< case NavigationDrawer.NAVIGATION_ITEM_AFFIX: Intent i = new Intent(getBaseContext(),AffixActivity.class); startActivity(i); // AffixActivity.startActivity(this); break; case NavigationDrawer.NAVIGATION_ITEM_EFFECTS: Intent i2 = new Intent(getBaseContext(),EffectsActivity.class); startActivity(i2); break; case NavigationDrawer.NAVIGATION_ITEM_SETTINGS: ======= case NAVIGATION_ITEM_SETTINGS: >>>>>>> case NavigationDrawer.NAVIGATION_ITEM_AFFIX: Intent i = new Intent(getBaseContext(),AffixActivity.class); startActivity(i); // AffixActivity.startActivity(this); break; case NavigationDrawer.NAVIGATION_ITEM_EFFECTS: Intent i2 = new Intent(getBaseContext(),EffectsActivity.class); startActivity(i2); break; case NAVIGATION_ITEM_SETTINGS:
<<<<<<< static final int PDUMAXLENGTH = 140; static final int ASCIIMAXLENGTH = 159; ======= >>>>>>> <<<<<<< int nBytesLeft = PDUMAXLENGTH - udhLength; ======= int nBytesLeft = dcs.getMaxMsglength() - udhLength; >>>>>>> int nBytesLeft = dcs.getMaxMsglength() - udhLength; <<<<<<< smsPdus = createOctalPdus(udhElements, ud, nBytesLeft+ASCIIMAXLENGTH-PDUMAXLENGTH); ======= smsPdus = createOctalPdus(udhElements, ud, nBytesLeft); >>>>>>> smsPdus = createOctalPdus(udhElements, ud, nBytesLeft);
<<<<<<< import com.mikepenz.iconics.utils.Utils; ======= import com.mikepenz.iconics.typeface.IIcon; >>>>>>> import com.mikepenz.iconics.utils.Utils; import com.mikepenz.iconics.typeface.IIcon; <<<<<<< /**** DRAWER ****/ ((TextView) findViewById(R.id.txtVersion)).setText(BuildConfig.VERSION_NAME); mDrawerLayout.addDrawerListener(new ActionBarDrawerToggle(this, mDrawerLayout, toolbar, R.string.drawer_open, R.string.drawer_close) { public void onDrawerClosed(View view) { } public void onDrawerOpened(View drawerView) { } }); ======= public void onDrawerOpened(View drawerView) { } }; drawer.addDrawerListener(drawerToggle); drawerToggle.syncState(); >>>>>>> ((TextView) findViewById(R.id.txtVersion)).setText(BuildConfig.VERSION_NAME); public void onDrawerOpened(View drawerView) { } }; drawer.addDrawerListener(drawerToggle); drawerToggle.syncState(); <<<<<<< togglePrimaryToolbarOptions(menu); updateSelectedStuff(); menu.findItem(R.id.select_all).setVisible(editMode); menu.findItem(R.id.exclude_action).setVisible((albumsMode && editMode) || (!albumsMode && !editMode)); menu.findItem(R.id.hideAlbumButton).setVisible((albumsMode && editMode) || (!albumsMode && !editMode)); menu.findItem(R.id.installShortcut).setVisible(albumsMode && editMode); menu.findItem(R.id.type_sort_action).setVisible(!albumsMode); menu.findItem(R.id.delete_action).setVisible(!albumsMode || editMode); menu.findItem(R.id.select_all).setShowAsAction(albumsMode && getAlbums().getSelectedCount()>1 ? MenuItem.SHOW_AS_ACTION_IF_ROOM : MenuItem.SHOW_AS_ACTION_NEVER); menu.findItem(R.id.clear_album_preview).setVisible(!albumsMode && getAlbum().hasCustomCover()); menu.findItem(R.id.renameAlbum).setVisible((albumsMode && getAlbums().getSelectedCount() == 1) || (!albumsMode && !editMode)); if (getAlbums().getSelectedCount() == 1) menu.findItem(R.id.set_pin_album).setTitle(getAlbums().getSelectedAlbum(0).isPinned() ? getString(R.string.un_pin) : getString(R.string.pin)); menu.findItem(R.id.set_pin_album).setVisible(albumsMode && getAlbums().getSelectedCount() == 1); menu.findItem(R.id.setAsAlbumPreview).setVisible(!albumsMode && getAlbum().getSelectedMediaCount() == 1); menu.findItem(R.id.affixPhoto).setVisible(!albumsMode && getAlbum().getSelectedMediaCount() > 1); menu.findItem(R.id.action_palette).setVisible(!albumsMode && getAlbum().getSelectedMediaCount() == 1 && (getAlbum().getSelectedMedia(0).isImage()||getAlbum().getSelectedMedia(0).isGif())); return super.onPrepareOptionsMenu(menu); } ======= >>>>>>> /*togglePrimaryToolbarOptions(menu); updateSelectedStuff(); menu.findItem(R.id.select_all).setVisible(editMode); menu.findItem(R.id.exclude_action).setVisible((albumsMode && editMode) || (!albumsMode && !editMode)); menu.findItem(R.id.hideAlbumButton).setVisible((albumsMode && editMode) || (!albumsMode && !editMode)); menu.findItem(R.id.installShortcut).setVisible(albumsMode && editMode); menu.findItem(R.id.type_sort_action).setVisible(!albumsMode); menu.findItem(R.id.delete_action).setVisible(!albumsMode || editMode); menu.findItem(R.id.select_all).setShowAsAction(albumsMode && getAlbums().getSelectedCount()>1 ? MenuItem.SHOW_AS_ACTION_IF_ROOM : MenuItem.SHOW_AS_ACTION_NEVER); menu.findItem(R.id.clear_album_preview).setVisible(!albumsMode && getAlbum().hasCustomCover()); menu.findItem(R.id.renameAlbum).setVisible((albumsMode && getAlbums().getSelectedCount() == 1) || (!albumsMode && !editMode)); if (getAlbums().getSelectedCount() == 1) menu.findItem(R.id.set_pin_album).setTitle(getAlbums().getSelectedAlbum(0).isPinned() ? getString(R.string.un_pin) : getString(R.string.pin)); menu.findItem(R.id.set_pin_album).setVisible(albumsMode && getAlbums().getSelectedCount() == 1); menu.findItem(R.id.setAsAlbumPreview).setVisible(!albumsMode && getAlbum().getSelectedMediaCount() == 1); menu.findItem(R.id.affixPhoto).setVisible(!albumsMode && getAlbum().getSelectedMediaCount() > 1); menu.findItem(R.id.action_palette).setVisible(!albumsMode && getAlbum().getSelectedMediaCount() == 1 && (getAlbum().getSelectedMedia(0).isImage()||getAlbum().getSelectedMedia(0).isGif())); return super.onPrepareOptionsMenu(menu); } */ <<<<<<< ======= //Album firstSelectedAlbum = albumsAdapter.getFirstSelectedAlbum(); >>>>>>> //Album firstSelectedAlbum = albumsAdapter.getFirstSelectedAlbum(); <<<<<<< case R.id.select_all: if (albumsMode) { if (getAlbums().getSelectedCount() == albumsAdapter.getItemCount()) { editMode = false; getAlbums().clearSelectedAlbums(); } else getAlbums().selectAllAlbums(); albumsAdapter.notifyDataSetChanged(); } else { ======= /*case R.id.select_all: { >>>>>>> /*case R.id.select_all: {
<<<<<<< msg.setAttachment((Serializable)map); ======= msg.setMsgContent(new SmsMmsNotificationMessage("http://www.baidu.com/abc/sfd",50*1024)); >>>>>>> msg.setAttachment((Serializable)map); msg.setMsgContent(new SmsMmsNotificationMessage("http://www.baidu.com/abc/sfd",50*1024)); <<<<<<< msg.setAttachment((Serializable)map); ======= msg.setMsgContent(new SmsMmsNotificationMessage("http://www.baidu.com/abc/sfd",50*1024)); >>>>>>> msg.setAttachment((Serializable)map); msg.setMsgContent(new SmsMmsNotificationMessage("http://www.baidu.com/abc/sfd",50*1024));
<<<<<<< import stroom.properties.api.PropertyService; ======= import stroom.properties.StroomPropertyService; import stroom.search.SearchException; >>>>>>> import stroom.properties.api.PropertyService; import stroom.search.SearchException; <<<<<<< private final IndexShardSearcherCache indexShardSearcherCache; private final PropertyService propertyService; ======= private final IndexShardWriterCache indexShardWriterCache; private final IndexShardService indexShardService; private final StroomPropertyService propertyService; >>>>>>> private final IndexShardWriterCache indexShardWriterCache; private final IndexShardService indexShardService; private final PropertyService propertyService; <<<<<<< IndexShardSearchTaskHandler(final IndexShardSearcherCache indexShardSearcherCache, final PropertyService propertyService, ======= IndexShardSearchTaskHandler(final IndexShardWriterCache indexShardWriterCache, final IndexShardService indexShardService, final StroomPropertyService propertyService, >>>>>>> IndexShardSearchTaskHandler(final IndexShardWriterCache indexShardWriterCache, final IndexShardService indexShardService, final PropertyService propertyService,
<<<<<<< public class JCRPlugin extends CRaSHPlugin<JCRPlugin> { /** . */ private static final Object LOCK = new Object(); ======= public abstract class JCRPlugin<T extends JCRPlugin> extends CRaSHPlugin<T> implements Service { >>>>>>> public abstract class JCRPlugin<T extends JCRPlugin> extends CRaSHPlugin<T> { /** . */
<<<<<<< import javax.inject.Inject; ======= import javax.annotation.Resource; import java.time.ZoneOffset; import java.util.ArrayList; import java.util.Collections; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.UUID; import java.util.function.Consumer; import java.util.function.Function; >>>>>>> import javax.inject.Inject; import java.time.ZoneOffset; import java.util.ArrayList; import java.util.Collections; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.UUID; import java.util.function.Consumer; import java.util.function.Function; <<<<<<< @Inject ======= @Resource >>>>>>> @Inject
<<<<<<< import stroom.util.guice.HasHealthCheckBinder; ======= import stroom.util.guice.HealthCheckBinder; import stroom.util.guice.RestResourcesBinder; >>>>>>> import stroom.util.guice.HasHealthCheckBinder; import stroom.util.guice.RestResourcesBinder;
<<<<<<< @XmlElement private String dateTimeLocale; ======= >>>>>>> <<<<<<< public String getDateTimeLocale() { return dateTimeLocale; } @Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; SearchRequest that = (SearchRequest) o; return new EqualsBuilder() .append(search, that.search) .append(componentResultRequests, that.componentResultRequests) .append(dateTimeLocale, that.dateTimeLocale) .isEquals(); } @Override public int hashCode() { HashCodeBuilder hashCodeBuilder = new HashCodeBuilder(); hashCodeBuilder.append(search); hashCodeBuilder.append(componentResultRequests); hashCodeBuilder.append(dateTimeLocale); return hashCodeBuilder.toHashCode(); } @Override public String toString() { return "SearchRequest{" + "search=" + search + ", componentResultRequests=" + componentResultRequests + ", dateTimeLocale='" + dateTimeLocale + '\'' + '}'; } ======= >>>>>>> @Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; SearchRequest that = (SearchRequest) o; return new EqualsBuilder() .append(search, that.search) .append(componentResultRequests, that.componentResultRequests) .append(dateTimeLocale, that.dateTimeLocale) .isEquals(); } @Override public int hashCode() { HashCodeBuilder hashCodeBuilder = new HashCodeBuilder(); hashCodeBuilder.append(search); hashCodeBuilder.append(componentResultRequests); hashCodeBuilder.append(dateTimeLocale); return hashCodeBuilder.toHashCode(); } @Override public String toString() { return "SearchRequest{" + "search=" + search + ", componentResultRequests=" + componentResultRequests + ", dateTimeLocale='" + dateTimeLocale + '\'' + '}'; }
<<<<<<< import stroom.security.api.SecurityContext; import stroom.task.api.ExecutorProvider; import stroom.task.api.TaskContext; import stroom.task.api.TaskContextFactory; import stroom.task.api.TaskExecutor; import stroom.task.api.TaskProducer; ======= import stroom.security.SecurityContext; import stroom.security.SecurityHelper; import stroom.util.concurrent.ExecutorProvider; import stroom.util.task.TaskWrapper; import stroom.util.task.taskqueue.TaskExecutor; import stroom.util.task.taskqueue.TaskProducer; >>>>>>> import stroom.security.api.SecurityContext; import stroom.task.api.ExecutorProvider; import stroom.task.api.TaskContext; import stroom.task.api.TaskContextFactory; import stroom.task.api.TaskExecutor; import stroom.task.api.TaskProducer; <<<<<<< final SecurityContext securityContext) { super(taskExecutor, maxThreadsPerTask, taskContextFactory, parentContext, TASK_NAME); ======= final SecurityContext securityContext, final ExtractionProgressTracker tracker) { super(taskExecutor, maxThreadsPerTask, taskWrapperProvider); >>>>>>> final SecurityContext securityContext, final ExtractionProgressTracker tracker) { super(taskExecutor, maxThreadsPerTask, taskContextFactory, parentContext, TASK_NAME); <<<<<<< topic = new LinkedBlockingQueueTopic<>(maxStoredDataQueueSize); ======= topic = new LinkedBlockingQueueTopic<>(maxStoredDataQueueSize, tracker); >>>>>>> topic = new LinkedBlockingQueueTopic<>(maxStoredDataQueueSize); <<<<<<< securityContext.asProcessingUser(() -> { LOGGER.debug("Starting extraction task producer"); try { while (!streamMapCreatorCompletionState.isComplete() && !Thread.currentThread().isInterrupted()) { try { // Poll for the next set of values. final Values values = topic.get(); if (values != null) { try { // If we have some values then map them. streamMapCreator.addEvent(streamEventMap, values.getValues()); } catch (final RuntimeException e) { LOGGER.debug(e.getMessage(), e); receivers.values().forEach(receiver -> { receiver.getErrorConsumer().accept(new Error(e.getMessage(), e)); receiver.getCompletionCountConsumer().accept(1L); }); } ======= try (final SecurityHelper securityHelper = SecurityHelper.elevate(securityContext)) { while (!streamMapCreatorCompletionState.isComplete() && !tracker.isTerminated() && !Thread.currentThread().isInterrupted()) { try { // Poll for the next set of values. final Values values = topic.get(); if (values != null) { try { // If we have some values then map them. streamMapCreator.addEvent(streamEventMap, values.getValues()); } catch (final RuntimeException e) { LOGGER.debug(e.getMessage(), e); receivers.values().forEach(receiver -> { receiver.getErrorConsumer().accept(new Error(e.getMessage(), e)); receiver.getCompletionCountConsumer().accept(1L); }); >>>>>>> securityContext.asProcessingUser(() -> { LOGGER.debug("Starting extraction task producer"); try { while (!streamMapCreatorCompletionState.isComplete() && !Thread.currentThread().isInterrupted()) { try { // Poll for the next set of values. final Values values = topic.get(); if (values != null) { try { // If we have some values then map them. streamMapCreator.addEvent(streamEventMap, values.getValues()); } catch (final RuntimeException e) { LOGGER.debug(e.getMessage(), e); receivers.values().forEach(receiver -> { receiver.getErrorConsumer().accept(new Error(e.getMessage(), e)); receiver.getCompletionCountConsumer().accept(1L); }); } <<<<<<< ======= } // Clear the event map if we have terminated so that other processing does not occur. if (tracker.isTerminated() || Thread.currentThread().isInterrupted()) { streamEventMap.clear(); } >>>>>>> <<<<<<< return Thread.currentThread().isInterrupted() || super.isComplete(); ======= return tracker.isComplete(); >>>>>>> return Thread.currentThread().isInterrupted() || tracker.isComplete(); <<<<<<< if (!Thread.currentThread().isInterrupted()) { ======= if (!tracker.isComplete()) { >>>>>>> if (!isComplete()) { <<<<<<< private static class ExtractionRunnable implements Consumer<TaskContext> { ======= @Override public String toString() { return "ExtractionTaskProducer{" + "tracker=" + tracker + '}'; } private static class ExtractionRunnable implements Runnable { >>>>>>> @Override public String toString() { return "ExtractionTaskProducer{" + "tracker=" + tracker + '}'; } private static class ExtractionRunnable implements Consumer<TaskContext> { <<<<<<< public void accept(final TaskContext taskContext) { final ExtractionTaskHandler handler = handlerProvider.get(); handler.exec(taskContext, task); ======= public void run() { try { final ExtractionTaskHandler handler = handlerProvider.get(); handler.exec(task); } finally { tracker.incrementTasksCompleted(); } >>>>>>> public void accept(final TaskContext taskContext) { try { final ExtractionTaskHandler handler = handlerProvider.get(); handler.exec(taskContext, task); } finally { tracker.incrementTasksCompleted(); }
<<<<<<< ======= public interface Resources extends ClientBundle { ImageResource flush(); ImageResource flushDisabled(); } >>>>>>> <<<<<<< private final ButtonView buttonFlush; private final ButtonView buttonClose; private final ButtonView buttonDelete; ======= private final ImageButtonView buttonFlush; private final GlyphButtonView buttonDelete; >>>>>>> private final ButtonView buttonFlush; private final ButtonView buttonDelete; <<<<<<< buttonFlush = getView().addButton(SvgPresets.SHARD_FLUSH); buttonClose = getView().addButton(SvgPresets.SHARD_CLOSE); buttonDelete = getView().addButton(SvgPresets.DELETE); ======= buttonFlush = getView().addButton("Flush Selected Shards", resources.flush(), resources.flushDisabled(), false); buttonDelete = getView().addButton(GlyphIcons.DELETE); >>>>>>> buttonFlush = getView().addButton(SvgPresets.SHARD_FLUSH); buttonDelete = getView().addButton(SvgPresets.DELETE);
<<<<<<< public Response isAuthorisedForStatistic(AuthorisationRequest authorisationRequest) { boolean result = securityContext.hasDocumentPermission( authorisationRequest.getDocRef().getType(), authorisationRequest.getDocRef().getUuid(), authorisationRequest.getPermissions()); return result ? Response.ok().build() : Response.status(Response.Status.UNAUTHORIZED).build(); ======= @ApiOperation( value = "Submit a request to verify if the user has the requested permission on a 'document'", response = Response.class) public Response isAuthorised(@ApiParam("AuthorisationRequest") final AuthorisationRequest authorisationRequest) { boolean result = authorisationService.hasDocumentPermission( authorisationRequest.getDocRef().getType(), authorisationRequest.getDocRef().getUuid(), authorisationRequest.getPermission()); return result ? Response .ok() .build() : Response .status(Response.Status.UNAUTHORIZED) .build(); >>>>>>> @ApiOperation( value = "Submit a request to verify if the user has the requested permission on a 'document'", response = Response.class) public Response isAuthorised(@ApiParam("AuthorisationRequest") final AuthorisationRequest authorisationRequest) { boolean result = securityContext.hasDocumentPermission( authorisationRequest.getDocRef().getType(), authorisationRequest.getDocRef().getUuid(), authorisationRequest.getPermission()); return result ? Response .ok() .build() : Response .status(Response.Status.UNAUTHORIZED) .build();
<<<<<<< private final FindIndexShardCriteria criteria = new FindIndexShardCriteria(); private final ButtonView buttonFlush; private final ButtonView buttonDelete; ======= private final FindIndexShardCriteria selectionCriteria = new FindIndexShardCriteria(); private final FindIndexShardCriteria queryCriteria = new FindIndexShardCriteria(); private final ImageButtonView buttonFlush; private final GlyphButtonView buttonDelete; >>>>>>> private final FindIndexShardCriteria selectionCriteria = new FindIndexShardCriteria(); private final FindIndexShardCriteria queryCriteria = new FindIndexShardCriteria(); private final ButtonView buttonFlush; private final ButtonView buttonDelete; <<<<<<< ======= private void close() { if (Boolean.TRUE.equals(selectionCriteria.getIndexShardSet().getMatchAll())) { ConfirmEvent.fire(this, "Are you sure you want to close the selected index shards?", result -> { if (result) { ConfirmEvent.fire(IndexShardPresenter.this, "You have selected to close all filtered index shards! Are you absolutely sure you want to do this?", result1 -> { if (result1) { doClose(); } }); } }); } else if (selectionCriteria.getIndexShardSet().isConstrained()) { ConfirmEvent.fire(this, "Are you sure you want to close the selected index shards?", result -> { if (result) { doClose(); } }); } else { AlertEvent.fireWarn(this, "No index shards have been selected for closing!", null); } } >>>>>>> <<<<<<< ======= private void doClose() { final CloseIndexShardAction action = new CloseIndexShardAction(selectionCriteria); dispatcher.exec(action).onSuccess(result -> AlertEvent.fireInfo(IndexShardPresenter.this, "Selected index shards will be closed. Please be patient as this may take some time.", this::refresh)); } >>>>>>>
<<<<<<< private static final Logger LOGGER = LoggerFactory.getLogger(TaskManagerImpl.class); ======= private static final StroomLogger LOGGER = StroomLogger.getLogger(TaskManagerImpl.class); private final TaskHandlerBeanRegistry taskHandlerBeanRegistry; private final NodeCache nodeCache; private final StroomBeanStore beanStore; private final SecurityContext securityContext; >>>>>>> private static final Logger LOGGER = LoggerFactory.getLogger(TaskManagerImpl.class); private final TaskHandlerBeanRegistry taskHandlerBeanRegistry; private final NodeCache nodeCache; private final StroomBeanStore beanStore; private final SecurityContext securityContext; <<<<<<< LOGGER.error(MarkerFactory.getMarker("FATAL"), "exec() - Unexpected Exception", t); ======= LOGGER.fatal("exec() - Unexpected Exception (" + task.getClass().getSimpleName() + ")", t); >>>>>>> LOGGER.error(MarkerFactory.getMarker("FATAL"), "exec() - Unexpected Exception (" + task.getClass().getSimpleName() + ")", t);
<<<<<<< ======= private final ClientDispatchAsync dispatcher; >>>>>>> private final ClientDispatchAsync dispatcher; <<<<<<< final Provider<NewPropertyPresenter> newPropertyPresenter) { super(eventBus, new DataGridViewImpl<>(true)); ======= final Provider<NewPropertyPresenter> newPropertyPresenter, final ClientDispatchAsync dispatcher) { super(eventBus, new DataGridViewImpl<PipelineProperty>(true)); >>>>>>> final Provider<NewPropertyPresenter> newPropertyPresenter, final ClientDispatchAsync dispatcher) { super(eventBus, new DataGridViewImpl<>(true));
<<<<<<< shards.parallelStream().forEach(shard -> { try { switch (action) { case FLUSH: final IndexShardWriter indexShardWriter = indexShardWriterCache.getWriterByShardId(shard.getId()); if (indexShardWriter != null) { LOGGER.debug(() -> action.getActivity() + " index shard " + shard.getId()); shardCount.incrementAndGet(); indexShardWriter.flush(); } break; ======= shards.parallelStream().forEach(shard -> new ThreadScopeRunnable() { @Override protected void exec() { try { switch (action) { case FLUSH: shardCount.incrementAndGet(); indexShardWriterCache.flush(shard.getId()); break; >>>>>>> shards.parallelStream().forEach(shard -> { try { switch (action) { case FLUSH: shardCount.incrementAndGet(); indexShardWriterCache.flush(shard.getId()); break; <<<<<<< case DELETE: shardCount.incrementAndGet(); setStatus(shard.getId(), IndexShardStatus.DELETED); break; ======= case DELETE: shardCount.incrementAndGet(); indexShardWriterCache.delete(shard.getId()); break; } } catch (final Exception e) { LOGGER.error(e::getMessage, e); >>>>>>> case DELETE: shardCount.incrementAndGet(); indexShardWriterCache.delete(shard.getId()); break;
<<<<<<< ======= protected static final String[] STANDARD_PERMISSIONS = new String[]{DocumentPermissionNames.USE, DocumentPermissionNames.READ, DocumentPermissionNames.UPDATE, DocumentPermissionNames.DELETE, DocumentPermissionNames.OWNER}; >>>>>>> <<<<<<< ======= private String getDocReference(BaseEntity entity) { if (entity == null) { return ""; } return "(" + DocRefUtil.create(entity).toString() + ")"; } >>>>>>> private String getDocReference(BaseEntity entity) { if (entity == null) { return ""; } return "(" + DocRefUtil.create(entity).toString() + ")"; } <<<<<<< if (!securityContext.hasDocumentPermission(FOLDER, folderUUID, DocumentPermissionNames.getDocumentCreatePermission(getEntityType()))) { throw new PermissionException("You do not have permission to create (" + getEntityType() + ") in folder " + folderUUID); ======= if (!securityContext.hasDocumentPermission(Folder.ENTITY_TYPE, folder.getUuid(), DocumentPermissionNames.getDocumentCreatePermission(getEntityType()))) { throw new PermissionException(securityContext.getUserId(), "You do not have permission to create " + getDocReference(entity) + " in folder " + folder); >>>>>>> if (!securityContext.hasDocumentPermission(FOLDER, folderUUID, DocumentPermissionNames.getDocumentCreatePermission(getEntityType()))) { throw new PermissionException(securityContext.getUserId(), "You do not have permission to create (" + getEntityType() + ") in folder " + folderUUID); <<<<<<< private void checkUpdatePermission(final DocRef docRef) { if (!securityContext.hasDocumentPermission(docRef.getType(), docRef.getUuid(), DocumentPermissionNames.UPDATE)) { throw new PermissionException("You do not have permission to update (" + docRef + ")"); ======= if (!securityContext.hasDocumentPermission(entity.getType(), entity.getUuid(), DocumentPermissionNames.UPDATE)) { throw new PermissionException(securityContext.getUserId(), "You do not have permission to update " + getDocReference(entity)); >>>>>>> private void checkUpdatePermission(final DocRef docRef) { if (!securityContext.hasDocumentPermission(docRef.getType(), docRef.getUuid(), DocumentPermissionNames.UPDATE)) { throw new PermissionException(securityContext.getUserId(), "You do not have permission to update (" + docRef + ")");
<<<<<<< import stroom.dashboard.shared.SearchResponse; ======= import stroom.dashboard.shared.DashboardSearchResponse; import stroom.query.api.v2.VisResult; import stroom.query.api.v2.VisResult.Store; >>>>>>> import stroom.dashboard.shared.DashboardSearchResponse; <<<<<<< import stroom.query.api.v2.VisResult; import stroom.query.api.v2.VisResult.Store; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.DeserializationFeature; import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.SerializationFeature; ======= >>>>>>> import stroom.query.api.v2.VisResult; import stroom.query.api.v2.VisResult.Store; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.DeserializationFeature; import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.SerializationFeature; <<<<<<< public SearchResponse mapResponse(final DashboardQueryKey queryKey, final stroom.query.api.v2.SearchResponse searchResponse) { ======= public DashboardSearchResponse mapResponse(final DashboardQueryKey queryKey, final stroom.query.api.v2.SearchResponse searchResponse) { >>>>>>> public DashboardSearchResponse mapResponse(final DashboardQueryKey queryKey, final stroom.query.api.v2.SearchResponse searchResponse) {
<<<<<<< import stroom.datasource.DataSourceProviderRegistry; ======= import stroom.datasource.api.v1.DataSource; >>>>>>> import stroom.datasource.DataSourceProviderRegistry; import stroom.datasource.api.v1.DataSource;
<<<<<<< import stroom.datasource.api.v2.DataSourceField; ======= import stroom.dashboard.shared.SearchRequest; import stroom.datasource.api.v1.DataSourceField; >>>>>>> import stroom.datasource.api.v2.DataSourceField; import stroom.dashboard.shared.SearchRequest;