@Override public String name(int value) { return mapValueToName.get(value); }
private void removeWindowIndex(int pageId, int windowIndex) { if (pageId != -1 && idToWindowIndices != null) { List<Integer> indices = idToWindowIndices.get(pageId); if (indices != null) { indices.remove(new Integer(windowIndex)); } } }
private void removeWindowIndex(int pageId, int windowIndex) { if (pageId != -1 && idToWindowIndices != null) { List indices = (List)idToWindowIndices.get(pageId); if (indices != null) { indices.remove(new Integer(windowIndex)); } } }
/** * Returns the index of the given page in the {@link #windows} list. * * @param pageId * @return window index */ private int getWindowIndex(int pageId) { if (idToWindowIndex == null) { rebuildIndices(); } Integer result = idToWindowIndex.get(pageId); return result != null ? result : -1; }
/** * Returns the index of the given page in the {@link #windows} list. * * @param pageId * @return window index */ private int getWindowIndex(int pageId) { if (idToWindowIndex == null) { rebuildIndices(); } Integer result = idToWindowIndex.get(pageId); return result != null ? result : -1; }
/** * Gets the combination * * @param uidString * @return ComponentAndInterface */ public ComponentAndInterface getComponentAndInterfaceForUID(String uidString) { IntKeyWeakReference ref = null; while ((ref = (IntKeyWeakReference)queue.poll()) != null) { directComponentRefs.remove(ref.uid); } int uid = Integer.parseInt(uidString); ComponentAndInterface cai = (ComponentAndInterface)directComponentRefs.get(uid); return cai; }
private void putWindowIndex(int pageId, int windowIndex) { if (pageId != -1 && idToWindowIndices != null) { List<Integer> indices = idToWindowIndices.get(pageId); Integer index = new Integer(windowIndex); if (indices == null) { indices = new ArrayList<Integer>(); indices.add(index); idToWindowIndices.put(pageId, indices); } else if (indices.contains(index) == false) { indices.add(index); } } }
private void putWindowIndex(int pageId, int windowIndex) { if (pageId != -1 && idToWindowIndices != null) { List indices = (List)idToWindowIndices.get(pageId); Integer index = new Integer(windowIndex); if (indices == null) { indices = new ArrayList(); indices.add(index); idToWindowIndices.put(pageId, indices); } else if (indices.contains(index) == false) { indices.add(index); } } }
ComponentAndInterface cai = directComponentRefs.get(uid); return cai;
/** * Removes all page windows for given page. Removes all page versions. * * @param pageId */ public void removePage(int pageId) { if (idToWindowIndices == null) { rebuildIndices(); } List indicesList = (List)idToWindowIndices.get(pageId); if (indicesList != null) { // we need to make a copy, as the removePage removes index from indicesList Object[] indices = indicesList.toArray(); for (int i = 0; i < indices.length; i++) { int index = ((Integer)indices[i]).intValue(); PageWindowInternal window = (PageWindowInternal)windows.get(index); if (window.pageId == pageId) { removePage(window.pageId, window.versionNumber, window.ajaxVersionNumber); } } } }
/** * Removes all page windows for given page. Removes all page versions. * * @param pageId */ public void removePage(int pageId) { if (idToWindowIndices == null) { rebuildIndices(); } List<Integer> indicesList = idToWindowIndices.get(pageId); if (indicesList != null) { // we need to make a copy, as the removePage removes index from indicesList Object[] indices = indicesList.toArray(); for (int i = 0; i < indices.length; i++) { int index = ((Integer)indices[i]).intValue(); PageWindowInternal window = windows.get(index); if (window.pageId == pageId) { removePage(window.pageId, window.versionNumber, window.ajaxVersionNumber); } } } }
/** * Returns the index of the given page in the {@link #windows} list. * * @param pageId * @param versionNumber * @param ajaxVersionNumber * @return window index */ private int getWindowIndex(int pageId, int versionNumber, int ajaxVersionNumber) { int index = -1; if (idToWindowIndices == null) { rebuildIndices(); } List<Integer> indices = idToWindowIndices.get(pageId); if (indices != null) { index = getWindowIndex(indices, pageId, versionNumber, ajaxVersionNumber); } return index; }
/** * Returns the index of the given page in the {@link #windows} list. * * @param pageId * @param versionNumber * @param ajaxVersionNumber * @return */ private int getWindowIndex(int pageId, int versionNumber, int ajaxVersionNumber) { int index = -1; if (idToWindowIndices == null) { rebuildIndices(); } List indices = (List)idToWindowIndices.get(pageId); if (indices != null) { index = getWindowIndex(indices, pageId, versionNumber, ajaxVersionNumber); } return index; }
value = handledObjects.get(handle); if (value == null)
value = handledObjects.get(handle); if (value == null)
Page page = (Page)pages.get(id); if (page != null)
Page page = pages.get(id); if (page != null)