List of usage examples for java.text Collator PRIMARY
int PRIMARY
To view the source code for java.text Collator PRIMARY.
Click Source Link
From source file:org.apache.solr.schema.CollationField.java
/** * Setup the field according to the provided parameters */// ww w.ja v a 2s.c om private void setup(ResourceLoader loader, Map<String, String> args) { String custom = args.remove("custom"); String language = args.remove("language"); String country = args.remove("country"); String variant = args.remove("variant"); String strength = args.remove("strength"); String decomposition = args.remove("decomposition"); final Collator collator; if (custom == null && language == null) throw new SolrException(ErrorCode.SERVER_ERROR, "Either custom or language is required."); if (custom != null && (language != null || country != null || variant != null)) throw new SolrException(ErrorCode.SERVER_ERROR, "Cannot specify both language and custom. " + "To tailor rules for a built-in language, see the javadocs for RuleBasedCollator. " + "Then save the entire customized ruleset to a file, and use with the custom parameter"); if (language != null) { // create from a system collator, based on Locale. collator = createFromLocale(language, country, variant); } else { // create from a custom ruleset collator = createFromRules(custom, loader); } // set the strength flag, otherwise it will be the default. if (strength != null) { if (strength.equalsIgnoreCase("primary")) collator.setStrength(Collator.PRIMARY); else if (strength.equalsIgnoreCase("secondary")) collator.setStrength(Collator.SECONDARY); else if (strength.equalsIgnoreCase("tertiary")) collator.setStrength(Collator.TERTIARY); else if (strength.equalsIgnoreCase("identical")) collator.setStrength(Collator.IDENTICAL); else throw new SolrException(ErrorCode.SERVER_ERROR, "Invalid strength: " + strength); } // set the decomposition flag, otherwise it will be the default. if (decomposition != null) { if (decomposition.equalsIgnoreCase("no")) collator.setDecomposition(Collator.NO_DECOMPOSITION); else if (decomposition.equalsIgnoreCase("canonical")) collator.setDecomposition(Collator.CANONICAL_DECOMPOSITION); else if (decomposition.equalsIgnoreCase("full")) collator.setDecomposition(Collator.FULL_DECOMPOSITION); else throw new SolrException(ErrorCode.SERVER_ERROR, "Invalid decomposition: " + decomposition); } analyzer = new CollationKeyAnalyzer(collator); }
From source file:net.felsing.client_cert.GetCountries.java
@Override protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { final Locale defaultLanguage = Locale.ENGLISH; String bestLanguage = null;//from ww w .jav a 2 s .c om resp.setContentType("application/json; charset=UTF-8"); resp.setCharacterEncoding("UTF-8"); final String acceptLanguage = StringEscapeUtils.escapeJava(req.getHeader("Accept-Language")); List<Locale.LanguageRange> languageRanges = Locale.LanguageRange.parse(acceptLanguage); for (Locale.LanguageRange l : languageRanges) { try { if (bestLanguage == null) { Locale locale = new Locale(l.getRange().split("-")[0]); bestLanguage = locale.getISO3Language(); logger.debug("bestLanguage: " + bestLanguage); usedLocale = locale; } } catch (Exception e) { // do nothing } } if (bestLanguage == null) { logger.debug("No sufficient language found for " + acceptLanguage); bestLanguage = defaultLanguage.getISO3Language(); usedLocale = Locale.ENGLISH; } logger.debug("usedLocale: " + usedLocale.getISO3Language()); PrintWriter pw = resp.getWriter(); loadFromJson(context); List<Country> countriesList = new ArrayList<>(); for (JsonElement jsonElement : countries) { String cca2 = jsonElement.getAsJsonObject().get("cca2").toString().replaceAll("\\\"", ""); cca2 = cca2.replaceAll("\\\\", ""); Country countryItem = new Country(); try { countryItem.name = jsonElement.getAsJsonObject().get("name").getAsJsonObject().get(bestLanguage) .getAsJsonObject().get("common").getAsString(); } catch (NullPointerException e) { countryItem.name = jsonElement.getAsJsonObject().get("name_").getAsString(); } countryItem.cca2 = cca2; countriesList.add(countryItem); } Collator coll = Collator.getInstance(usedLocale); coll.setStrength(Collator.PRIMARY); Collections.sort(countriesList); pw.print(new Gson().toJson(countriesList)); pw.flush(); }
From source file:br.ufrgs.ufrgsmapas.libs.SearchBox.java
/** * Create a searchbox with params and a style * @param context Context//from www.j a va2 s . c om * @param attrs Attributes * @param defStyle Style */ public SearchBox(Context context, AttributeSet attrs, int defStyle) { super(context, attrs, defStyle); inflate(context, R.layout.searchbox, this); this.searchOpen = false; this.isMic = true; this.materialMenu = (MaterialMenuView) findViewById(R.id.material_menu_button); this.logo = (TextView) findViewById(R.id.logo); this.search = (EditText) findViewById(R.id.search); this.results = (ListView) findViewById(R.id.results); this.context = context; this.pb = (ProgressBar) findViewById(R.id.pb); this.mic = (ImageView) findViewById(R.id.mic); this.drawerLogo = (ImageView) findViewById(R.id.drawer_logo); mCollator = Collator.getInstance(new Locale("pt", "BR")); mCollator.setStrength(Collator.PRIMARY); materialMenu.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { if (searchOpen) { toggleSearch(); } else { if (menuListener != null) menuListener.onMenuClick(); } } }); resultList = new ArrayList<SearchResult>(); results.setAdapter(new SearchAdapter(context, resultList)); animate = true; isVoiceRecognitionIntentSupported = isIntentAvailable(context, new Intent(RecognizerIntent.ACTION_RECOGNIZE_SPEECH)); logo.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { toggleSearch(); } }); if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) { RelativeLayout searchRoot = (RelativeLayout) findViewById(R.id.search_root); LayoutTransition lt = new LayoutTransition(); lt.setDuration(100); searchRoot.setLayoutTransition(lt); } searchables = new ArrayList<SearchResult>(); search.setOnEditorActionListener(new OnEditorActionListener() { public boolean onEditorAction(TextView v, int actionId, KeyEvent event) { if (actionId == EditorInfo.IME_ACTION_SEARCH) { search(getSearchText()); return true; } return false; } }); search.setOnKeyListener(new OnKeyListener() { public boolean onKey(View v, int keyCode, KeyEvent event) { if (keyCode == KeyEvent.KEYCODE_ENTER) { if (TextUtils.isEmpty(getSearchText())) { toggleSearch(); } else { search(getSearchText()); } return true; } return false; } }); logoText = "Logo"; micStateChanged(); mic.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { if (voiceRecognitionListener != null) { voiceRecognitionListener.onClick(); } else { micClick(); } } }); }
From source file:StringComparable.java
private static final int getMask(final int strength) { switch (strength) { case Collator.PRIMARY: return 0xFFFF0000; case Collator.SECONDARY: return 0xFFFFFF00; default:/*from www . j ava2s. c om*/ return 0xFFFFFFFF; } }
From source file:com.andryr.musicplayer.activities.MusicPicker.java
private void getSongList() { ContentResolver resolver = getContentResolver(); Uri musicUri = MediaStore.Audio.Media.EXTERNAL_CONTENT_URI; Cursor cursor = resolver.query(musicUri, sProjection, null, null, null); if (cursor != null && cursor.moveToFirst()) { int idCol = cursor.getColumnIndex(MediaStore.Audio.Playlists.Members.AUDIO_ID); if (idCol == -1) { idCol = cursor.getColumnIndex(MediaStore.Audio.Media._ID); }// w w w . ja v a 2s . c o m int titleCol = cursor.getColumnIndex(MediaStore.Audio.Media.TITLE); int artistCol = cursor.getColumnIndex(MediaStore.Audio.Media.ARTIST); int albumCol = cursor.getColumnIndex(MediaStore.Audio.Media.ALBUM); int albumIdCol = cursor.getColumnIndex(MediaStore.Audio.Media.ALBUM_ID); int trackCol = cursor.getColumnIndex(MediaStore.Audio.Media.TRACK); int durationCol = cursor.getColumnIndex(MediaStore.Audio.Media.DURATION); do { long id = cursor.getLong(idCol); String title = cursor.getString(titleCol); String artist = cursor.getString(artistCol); String album = cursor.getString(albumCol); long albumId = cursor.getLong(albumIdCol); int track = cursor.getInt(trackCol); long duration = cursor.getLong(durationCol); mSongList.add(new Song(id, title, artist, album, albumId, track, duration)); } while (cursor.moveToNext()); Collections.sort(mSongList, new Comparator<Song>() { @Override public int compare(Song lhs, Song rhs) { Collator c = Collator.getInstance(Locale.getDefault()); c.setStrength(Collator.PRIMARY); return c.compare(lhs.getTitle(), rhs.getTitle()); } }); } if (cursor != null) { cursor.close(); } }
From source file:org.fao.geonet.component.csw.GetDomain.java
public static List<Element> handlePropertyName(CatalogConfiguration catalogConfig, String[] propertyNames, ServiceContext context, boolean freq, int maxRecords, String cswServiceSpecificConstraint, LuceneConfig luceneConfig) throws Exception { List<Element> domainValuesList = new ArrayList<Element>(); if (Log.isDebugEnabled(Geonet.CSW)) Log.debug(Geonet.CSW, "Handling property names '" + Arrays.toString(propertyNames) + "' with max records of " + maxRecords); for (int i = 0; i < propertyNames.length; i++) { // Initialize list of values element. Element listOfValues = null; // Generate DomainValues element Element domainValues = new Element("DomainValues", Csw.NAMESPACE_CSW); // FIXME what should be the type ??? domainValues.setAttribute("type", "csw:Record"); String property = propertyNames[i].trim(); // Set propertyName in any case. Element pn = new Element("PropertyName", Csw.NAMESPACE_CSW); domainValues.addContent(pn.setText(property)); GeonetContext gc = (GeonetContext) context.getHandlerContext(Geonet.CONTEXT_NAME); SearchManager sm = gc.getBean(SearchManager.class); IndexAndTaxonomy indexAndTaxonomy = sm.getNewIndexReader(null); try {//www . j a v a 2 s. co m GeonetworkMultiReader reader = indexAndTaxonomy.indexReader; BooleanQuery groupsQuery = (BooleanQuery) CatalogSearcher.getGroupsQuery(context); BooleanQuery query = null; // Apply CSW service specific constraint if (StringUtils.isNotEmpty(cswServiceSpecificConstraint)) { Query constraintQuery = CatalogSearcher .getCswServiceSpecificConstraintQuery(cswServiceSpecificConstraint, luceneConfig); query = new BooleanQuery(); BooleanClause.Occur occur = LuceneUtils.convertRequiredAndProhibitedToOccur(true, false); query.add(groupsQuery, occur); query.add(constraintQuery, occur); } else { query = groupsQuery; } List<Pair<String, Boolean>> sortFields = Collections .singletonList(Pair.read(Geonet.SearchResult.SortBy.RELEVANCE, true)); Sort sort = LuceneSearcher.makeSort(sortFields, context.getLanguage(), false); CachingWrapperFilter filter = null; Pair<TopDocs, Element> searchResults = LuceneSearcher.doSearchAndMakeSummary(maxRecords, 0, maxRecords, context.getLanguage(), null, luceneConfig, reader, query, filter, sort, null, false); TopDocs hits = searchResults.one(); try { // Get mapped lucene field in CSW configuration String indexField = catalogConfig.getFieldMapping().get(property.toLowerCase()); if (indexField != null) property = indexField; // check if params asked is in the index using getFieldNames ? @SuppressWarnings("resource") FieldInfos fi = SlowCompositeReaderWrapper.wrap(reader).getFieldInfos(); if (fi.fieldInfo(property) == null) continue; boolean isRange = false; if (catalogConfig.getGetRecordsRangeFields().contains(property)) isRange = true; if (isRange) listOfValues = new Element("RangeOfValues", Csw.NAMESPACE_CSW); else listOfValues = new Element("ListOfValues", Csw.NAMESPACE_CSW); Set<String> fields = new HashSet<String>(); fields.add(property); fields.add("_isTemplate"); // parse each document in the index String[] fieldValues; Collator stringCollator = Collator.getInstance(); stringCollator.setStrength(Collator.PRIMARY); SortedSet<String> sortedValues = new TreeSet<String>(stringCollator); ObjectKeyIntOpenHashMap duplicateValues = new ObjectKeyIntOpenHashMap(); for (int j = 0; j < hits.scoreDocs.length; j++) { DocumentStoredFieldVisitor selector = new DocumentStoredFieldVisitor(fields); reader.document(hits.scoreDocs[j].doc, selector); Document doc = selector.getDocument(); // Skip templates and subTemplates String[] isTemplate = doc.getValues("_isTemplate"); if (isTemplate[0] != null && !isTemplate[0].equals("n")) continue; // Get doc values for specified property fieldValues = doc.getValues(property); if (fieldValues == null) continue; addtoSortedSet(sortedValues, fieldValues, duplicateValues); } SummaryComparator valuesComparator = new SummaryComparator(SortOption.FREQUENCY, Type.STRING, context.getLanguage(), null); TreeSet<SummaryComparator.SummaryElement> sortedValuesFrequency = new TreeSet<SummaryComparator.SummaryElement>( valuesComparator); ObjectKeyIntMapIterator entries = duplicateValues.entries(); while (entries.hasNext()) { entries.next(); sortedValuesFrequency.add(new SummaryComparator.SummaryElement(entries)); } if (freq) return createValuesByFrequency(sortedValuesFrequency); else listOfValues.addContent(createValuesElement(sortedValues, isRange)); } finally { // any children means that the catalog was unable to determine // anything about the specified parameter if (listOfValues != null && listOfValues.getChildren().size() != 0) domainValues.addContent(listOfValues); // Add current DomainValues to the list domainValuesList.add(domainValues); } } finally { sm.releaseIndexReader(indexAndTaxonomy); } } return domainValuesList; }
From source file:org.nimbustools.messaging.query.security.QueryAuthenticationFilter.java
private String getStringToSign_v1(HttpServletRequest request) { // Request must mapped to into a canonical string format. See: // http://docs.amazonwebservices.com/AWSEC2/latest/DeveloperGuide/using-query-api.html#query-authentication final StringBuilder buf = new StringBuilder(); Collator stringCollator = Collator.getInstance(); stringCollator.setStrength(Collator.PRIMARY); final Set<String> sortedKeys = new TreeSet<String>(stringCollator); final Enumeration paramNames = request.getParameterNames(); while (paramNames.hasMoreElements()) { String param = (String) paramNames.nextElement(); // don't include signature in canonical query string if (!param.equals(this.signatureParameter)) { sortedKeys.add(param);//from w w w . ja va 2 s . c o m } } for (String key : sortedKeys) { String[] values = request.getParameterValues(key); for (String val : values) { buf.append(key).append(val); } } return buf.toString(); }
From source file:org.eclipse.smarthome.io.rest.core.extensions.ExtensionResource.java
private Set<ExtensionType> getAllExtensionTypes(Locale locale) { final Collator coll = Collator.getInstance(locale); coll.setStrength(Collator.PRIMARY); Set<ExtensionType> ret = new TreeSet<>(new Comparator<ExtensionType>() { @Override// ww w. j a va 2 s. co m public int compare(ExtensionType o1, ExtensionType o2) { return coll.compare(o1.getLabel(), o2.getLabel()); } }); for (ExtensionService extensionService : extensionServices) { ret.addAll(extensionService.getTypes(locale)); } return ret; }
From source file:com.xerox.amazonws.common.AWSQueryConnection.java
/** * Make a http request and process the response. This method also performs automatic retries. * * @param method The HTTP method to use (GET, POST, DELETE, etc) * @param action the name of the action for this query request * @param params map of request params/* ww w.j a v a 2s.c o m*/ * @param respType the class that represents the desired/expected return type */ protected <T> T makeRequest(HttpMethodBase method, String action, Map<String, String> params, Class<T> respType) throws HttpException, IOException, JAXBException { // add auth params, and protocol specific headers Map<String, String> qParams = new HashMap<String, String>(params); qParams.put("Action", action); qParams.put("AWSAccessKeyId", getAwsAccessKeyId()); qParams.put("SignatureVersion", "" + sigVersion); qParams.put("Timestamp", httpDate()); if (headers != null) { for (Iterator<String> i = headers.keySet().iterator(); i.hasNext();) { String key = i.next(); for (Iterator<String> j = headers.get(key).iterator(); j.hasNext();) { qParams.put(key, j.next()); } } } // sort params by key ArrayList<String> keys = new ArrayList<String>(qParams.keySet()); Collator stringCollator = Collator.getInstance(); stringCollator.setStrength(Collator.PRIMARY); Collections.sort(keys, stringCollator); // build param string StringBuilder resource = new StringBuilder(); if (sigVersion == 0) { // ensure Action, Timestamp come first! resource.append(qParams.get("Action")); resource.append(qParams.get("Timestamp")); } else { for (String key : keys) { resource.append(key); resource.append(qParams.get(key)); } } // calculate signature String encoded = urlencode(encode(getSecretAccessKey(), resource.toString(), false)); // build param string, encoding values and adding request signature resource = new StringBuilder(); for (String key : keys) { resource.append("&"); resource.append(key); resource.append("="); resource.append(urlencode(qParams.get(key))); } resource.setCharAt(0, '?'); // set first param delimeter resource.append("&Signature="); resource.append(encoded); // finally, build request object URL url = makeURL(resource.toString()); method.setURI(new URI(url.toString(), true)); method.setRequestHeader(new Header("User-Agent", userAgent)); if (sigVersion == 0) { method.setRequestHeader(new Header("Content-Type", "application/x-www-form-urlencoded; charset=utf-8")); } Object response = null; boolean done = false; int retries = 0; boolean doRetry = false; String errorMsg = ""; do { int responseCode = 600; // default to high value, so we don't think it is valid try { responseCode = getHttpClient().executeMethod(method); } catch (SocketException ex) { // these can generally be retried. Treat it like a 500 error doRetry = true; errorMsg = ex.getMessage(); } // 100's are these are handled by httpclient if (responseCode < 300) { // 200's : parse normal response into requested object if (respType != null) { InputStream iStr = method.getResponseBodyAsStream(); response = JAXBuddy.deserializeXMLStream(respType, iStr); } done = true; } else if (responseCode < 400) { // 300's : what to do? throw new HttpException("redirect error : " + responseCode); } else if (responseCode < 500) { // 400's : parse client error message String body = getStringFromStream(method.getResponseBodyAsStream()); throw new HttpException("Client error : " + getErrorDetails(body)); } else if (responseCode < 600) { // 500's : retry... doRetry = true; String body = getStringFromStream(method.getResponseBodyAsStream()); errorMsg = getErrorDetails(body); } if (doRetry) { retries++; if (retries > maxRetries) { throw new HttpException("Number of retries exceeded : " + action + ", " + errorMsg); } doRetry = false; try { Thread.sleep((int) Math.pow(2.0, retries) * 1000); } catch (InterruptedException ex) { } } } while (!done); return (T) response; }
From source file:org.olat.modules.fo.ForumController.java
/** * @param forum//from w w w.j a v a 2 s. c o m * @param focallback * @param ureq * @param wControl */ ForumController(final Forum forum, final ForumCallback focallback, final UserRequest ureq, final WindowControl wControl) { super(ureq, wControl); this.forum = forum; this.focallback = focallback; addLoggingResourceable(LoggingResourceable.wrap(forum)); forumOres = OresHelper.createOLATResourceableInstance(Forum.class, forum.getKey()); f = Formatter.getInstance(ureq.getLocale()); fm = ForumManager.getInstance(); msgs = fm.getMessagesByForum(forum); collator = Collator.getInstance(ureq.getLocale()); collator.setStrength(Collator.PRIMARY); forumPanel = new Panel("forumPanel"); forumPanel.addListener(this); // create page vcListTitles = createVelocityContainer("list_titles"); msgCreateButton = LinkFactory.createButtonSmall("msg.create", vcListTitles, this); archiveForumButton = LinkFactory.createButtonSmall("archive.forum", vcListTitles, this); filterForUserButton = LinkFactory.createButtonSmall("filter", vcListTitles, this); if (!this.isGuestOnly(ureq)) { final SearchServiceUIFactory searchServiceUIFactory = (SearchServiceUIFactory) CoreSpringFactory .getBean(SearchServiceUIFactory.class); searchController = searchServiceUIFactory.createInputController(ureq, wControl, DisplayOption.STANDARD, null); listenTo(searchController); vcListTitles.put("search_input", searchController.getInitialComponent()); } // a list of titles of all messages in all threads vcListTitles.contextPut("security", focallback); // --- subscription --- subsContext = focallback.getSubscriptionContext(); // if sc is null, then no subscription is desired if (subsContext != null) { // FIXME fj: implement subscription callback for group forums final String businessPath = wControl.getBusinessControl().getAsString(); final String data = String.valueOf(forum.getKey()); final PublisherData pdata = new PublisherData(OresHelper.calculateTypeName(Forum.class), data, businessPath); csc = new ContextualSubscriptionController(ureq, getWindowControl(), subsContext, pdata); listenTo(csc); vcListTitles.put("subscription", csc.getInitialComponent()); } final TableGuiConfiguration tableConfig = new TableGuiConfiguration(); tableConfig.setCustomCssClass("o_forum"); tableConfig.setSelectedRowUnselectable(true); tableConfig.setDownloadOffered(false); tableConfig.setTableEmptyMessage(translate("forum.emtpy")); allThreadTableCtr = new TableController(tableConfig, ureq, getWindowControl(), getTranslator()); listenTo(allThreadTableCtr); allThreadTableCtr.addColumnDescriptor(new CustomRenderColumnDescriptor("table.header.typeimg", 0, null, ureq.getLocale(), ColumnDescriptor.ALIGNMENT_LEFT, new MessageIconRenderer())); allThreadTableCtr.addColumnDescriptor(new StickyRenderColumnDescriptor("table.thread", 1, CMD_SHOWDETAIL, ureq.getLocale(), ColumnDescriptor.ALIGNMENT_LEFT, new StickyThreadCellRenderer())); allThreadTableCtr.addColumnDescriptor( new StickyColumnDescriptor("table.userfriendlyname", 2, null, ureq.getLocale())); allThreadTableCtr.addColumnDescriptor(new StickyColumnDescriptor("table.lastModified", 3, null, ureq.getLocale(), ColumnDescriptor.ALIGNMENT_CENTER)); allThreadTableCtr.addColumnDescriptor(new StickyColumnDescriptor("table.marked", 4, CMD_SHOWMARKED, ureq.getLocale(), ColumnDescriptor.ALIGNMENT_RIGHT)); allThreadTableCtr.addColumnDescriptor(new StickyColumnDescriptor("table.unread", 5, CMD_SHOWNEW, ureq.getLocale(), ColumnDescriptor.ALIGNMENT_RIGHT)); allThreadTableCtr.addColumnDescriptor(new StickyColumnDescriptor("table.total", 6, null, ureq.getLocale(), ColumnDescriptor.ALIGNMENT_RIGHT)); singleThreadTableCtr = new TableController(tableConfig, ureq, getWindowControl(), getTranslator()); listenTo(singleThreadTableCtr); singleThreadTableCtr.addColumnDescriptor(new ThreadColumnDescriptor("table.title", 0, CMD_SHOWDETAIL)); singleThreadTableCtr.addColumnDescriptor( new DefaultColumnDescriptor("table.userfriendlyname", 1, null, ureq.getLocale())); singleThreadTableCtr.addColumnDescriptor(new DefaultColumnDescriptor("table.modified", 2, null, ureq.getLocale(), ColumnDescriptor.ALIGNMENT_CENTER)); singleThreadTableCtr.addColumnDescriptor( new BooleanColumnDescriptor("table.header.state", 3, "", translate("table.row.new"))); rms = getReadSet(ureq.getIdentity()); // here we fetch which messages had // been read by the user threadList = prepareListTitles(msgs); // precalulate message deepness precalcMessageDeepness(msgs); // Default view forumPanel = putInitialPanel(vcListTitles); // jump to either the forum or the folder if the business-launch-path says so. final BusinessControl bc = getWindowControl().getBusinessControl(); final ContextEntry ce = bc.popLauncherContextEntry(); if (ce != null) { // a context path is left for me if (isLogDebugEnabled()) { logDebug("businesscontrol (for further jumps) would be: ", bc.toString()); } final OLATResourceable ores = ce.getOLATResourceable(); if (isLogDebugEnabled()) { logDebug("OLATResourceable= ", ores.toString()); } final Long resId = ores.getResourceableId(); if (resId.longValue() != 0) { if (isLogDebugEnabled()) { logDebug("messageId=", ores.getResourceableId().toString()); } currentMsg = fm.findMessage(ores.getResourceableId()); if (currentMsg != null) { showThreadView(ureq, currentMsg, null); scrollToCurrentMessage(); } else { // message not found, do nothing. Load normal start screen logDebug("Invalid messageId=", ores.getResourceableId().toString()); } } else { // FIXME:chg: Should not happen, occurs when course-node are called if (isLogDebugEnabled()) { logDebug("Invalid messageId=", ores.getResourceableId().toString()); } } } // Register for forum events CoordinatorManager.getInstance().getCoordinator().getEventBus().registerFor(this, ureq.getIdentity(), forum); // filter for user vcFilterView = createVelocityContainer("filter_view"); }