List of usage examples for java.util Collections unmodifiableCollection
public static <T> Collection<T> unmodifiableCollection(Collection<? extends T> c)
From source file:cn.guoyukun.spring.jpa.entity.search.SearchRequest.java
@Override public Collection<SearchFilter> getSearchFilters() { return Collections.unmodifiableCollection(searchFilters); }
From source file:nl.salp.warcraft4j.casc.cdn.CdnCascContext.java
/** * Get all encoding entries.// w ww .ja v a 2 s .c o m * * @return The encoding entries. */ public final Collection<EncodingEntry> getEncodingEntries() { return Collections.unmodifiableCollection(getEncoding().getEntries()); }
From source file:com.cloudseal.spring.client.userdetails.CloudsealUserAttributes.java
private Collection<GrantedAuthority> removeRoleListAttribute(Map<String, Collection<XMLObject>> attributes) { Collection<XMLObject> list = attributes.remove(ROLES); if (list == null || list.isEmpty()) { return Collections.emptyList(); }//from ww w .j a va2 s . com Collection<GrantedAuthority> roles = new ArrayList<GrantedAuthority>(list.size()); for (XMLObject xmlObject : list) { if (XSString.class.isInstance(xmlObject)) { String roleName = ((XSString) xmlObject).getValue(); roles.add(new GrantedAuthorityImpl(roleName)); } } return Collections.unmodifiableCollection(roles); }
From source file:edu.cornell.mannlib.vitro.webapp.auth.policy.bean.PropertyRestrictionPolicyHelper.java
private Collection<String> unmodifiable(Collection<String> raw) { if (raw == null) { return Collections.emptyList(); } else {//from w w w . ja v a2 s . c om return Collections.unmodifiableCollection(new HashSet<String>(raw)); } }
From source file:de.uniba.wiai.kinf.pw.projects.lillytab.reasoner.tbox.AssertedRBox.java
@Override public Collection<R> getRoles() { final Collection<R> value = _roleTypeMap.keySet(); if (value != null) { return Collections.unmodifiableCollection(value); } else {/*from w w w . j av a2 s. com*/ return Collections.emptySet(); } }
From source file:fr.gouv.culture.thesaurus.service.rdf.RdfResource.java
/** * Returns all the values of the specified entry property. * //from w ww . j a v a 2 s . c o m * @param key * the property URI. * @param locale * the language tagging the property values or <code>null</code> * to get the values without any language tag. * @return the values of the property tagged with the specified language or * an empty list if none is present. */ public Collection<LocalizedString> getProperties(String key, String locale) { return Collections.unmodifiableCollection(internalGetProperties(key, locale)); }
From source file:org.geppetto.frontend.controllers.GeppettoServletController.java
/** * Return all the current web socket connections * /*from w w w .j av a2s.c o m*/ * @return */ public Collection<GeppettoMessageInbound> getConnections() { return Collections.unmodifiableCollection(_connections.values()); }
From source file:com.alfaariss.oa.engine.requestor.configuration.ConfigurationFactory.java
/** * {@inheritDoc}/* w w w .j a v a 2 s.c o m*/ * @see com.alfaariss.oa.engine.core.requestor.factory.IRequestorPoolFactory#getAllEnabledRequestors() */ @Override public Collection<IRequestor> getAllEnabledRequestors() throws RequestorException { Collection<IRequestor> collRequestors = new Vector<IRequestor>(); if (_mapRequestors != null) { for (IRequestor requestor : _mapRequestors.values()) { if (requestor.isEnabled()) collRequestors.add(requestor); } } return Collections.unmodifiableCollection(collRequestors); }
From source file:org.openinfinity.sso.identityprovisioning.bpmn.ProcessEngineBridgeImpl.java
public Collection<org.openinfinity.sso.identityprovisioning.bpmn.Task> queryForTasksByRole(String role) { SecurityContext securityContext = SecurityContextHolder.getContext(); Authentication authentication = securityContext.getAuthentication(); IdentityService identityService = processEngine.getIdentityService(); identityService.setAuthenticatedUserId(authentication.getName()); TaskService taskService = processEngine.getTaskService(); List<Task> tasks = taskService.createTaskQuery().taskCandidateGroup(role).list(); Collection<org.openinfinity.sso.identityprovisioning.bpmn.Task> simpleTasks = mapTasks(tasks); return Collections.unmodifiableCollection(simpleTasks); }
From source file:de.uniba.wiai.kinf.pw.projects.lillytab.reasoner.tbox.RBox.java
@Override public Collection<R> getSubRoles(R role) { if (!hasRole(role)) { throw new IllegalArgumentException(String.format("Unknown role `%s'", role)); }//from ww w .ja v a2s . co m final Collection<R> subRoles = _subRoles.get(role); if (subRoles != null) { return Collections.unmodifiableCollection(subRoles); } else { return null; } }