List of usage examples for org.apache.commons.collections FastArrayList FastArrayList
public FastArrayList()
From source file:de.xplib.xdbm.util.Config.java
/** * Adds a database uri for a special jar file to the config. * /* w w w . jav a 2 s. com*/ * @param jarIn The jar file which is the key. * @param uriIn The database uri. */ public void putDatabaseURI(final String jarIn, final String uriIn) { if (!this.dbUris.containsKey(jarIn)) { FastArrayList list = new FastArrayList(); list.setFast(true); this.dbUris.put(jarIn, list); } ArrayList uris = (ArrayList) this.dbUris.get(jarIn); uris.add(uriIn); }
From source file:de.xplib.xdbm.util.Config.java
/** * @param jarIn The jar file./*from w ww . j a v a 2s.c om*/ * @return A List with the uris. */ public List getDatabaseURIs(final String jarIn) { if (this.dbUris.containsKey(jarIn)) { return (List) this.dbUris.get(jarIn); } return new FastArrayList(); }
From source file:org.apache.torque.manager.AbstractBaseManager.java
/** * * @param key//www.jav a2s . c o m * @return A subset of the list identified by <code>key</code>. */ private synchronized FastArrayList createSubsetList(String key) { FastArrayList list = null; if (listenersMap.containsKey(key)) { list = listenersMap.get(key); } else { list = new FastArrayList(); list.setFast(true); listenersMap.put(key, list); } return list; }
From source file:org.craftercms.cstudio.alfresco.dm.service.impl.DmSimpleWorkflowServiceImpl.java
@Override public List<DmContentItemTO> getScheduledItems(String site, String sub, DmContentItemComparator comparator, DmContentItemComparator subComparator, String filterType) { ServicesConfig servicesConfig = getService(ServicesConfig.class); PersistenceManagerService persistenceManagerService = getService(PersistenceManagerService.class); List<DmContentItemTO> results = new FastArrayList(); List<String> displayPatterns = servicesConfig.getDisplayInWidgetPathPatterns(site); List<CopyToEnvironmentItem> deploying = findScheduledItems(site); SimpleDateFormat format = new SimpleDateFormat(CStudioConstants.DATE_FORMAT_SCHEDULED); List<DmContentItemTO> scheduledItems = new ArrayList<DmContentItemTO>(); for (CopyToEnvironmentItem deploymentItem : deploying) { String fullPath = servicesConfig.getRepositoryRootPath(deploymentItem.getSite()) + deploymentItem.getPath(); NodeRef noderef = persistenceManagerService.getNodeRef(fullPath); addScheduledItem(site, deploymentItem.getScheduledDate(), format, noderef, results, comparator, subComparator, null, displayPatterns, filterType, null); }/*from w w w .j av a 2s. c o m*/ return results; }
From source file:org.craftercms.studio.impl.v1.service.deployment.DeploymentServiceImpl.java
protected List<ContentItemTO> getScheduledItems(String site, DmContentItemComparator comparator, DmContentItemComparator subComparator, String filterType) { List<ContentItemTO> results = new FastArrayList(); List<String> displayPatterns = servicesConfig.getDisplayInWidgetPathPatterns(site); List<CopyToEnvironment> deploying = getScheduledItems(site); SimpleDateFormat format = new SimpleDateFormat(CStudioConstants.DATE_FORMAT_SCHEDULED); List<ContentItemTO> scheduledItems = new ArrayList<ContentItemTO>(); for (CopyToEnvironment deploymentItem : deploying) { String fullPath = contentService.expandRelativeSitePath(site, deploymentItem.getPath()); Set<String> permissions = securityService.getUserPermissions(site, deploymentItem.getPath(), securityService.getCurrentUser(), Collections.<String>emptyList()); if (permissions.contains(CStudioConstants.PERMISSION_VALUE_PUBLISH)) { addScheduledItem(site, deploymentItem.getScheduledDate(), format, fullPath, results, comparator, subComparator, displayPatterns, filterType); }//from www . j av a 2s . c om } return results; }
From source file:org.opennms.acl.service.AclCategoryNodeServiceImpl.java
/** * <p>init</p>//from ww w . j a v a 2s . c o m */ @SuppressWarnings("unchecked") public void init() { List<AuthorityDTO> authorities = new FastArrayList(); for (AuthorityDTO authorityDTO : authorityService.getAuthorities()) { authorityDTO.setItems(authorityService.getIdItemsAuthority(authorityDTO.getId())); if (authorityDTO.hasItems()) { authorities.add(authorityDTO); } } if (authorities.size() > 0) { authItemsHelper = new AuthoritiesNodeHelper(authorities); } ready = true; }