@Override public ClassMap put(final Class clazz) { return classMapCache.get(clazz); }
@Override public List<IssueSecurityLevelPermission> getPermissionsBySecurityLevel(Long securityLevelId) { return securityLevelToPermissionsCache.get(securityLevelId); }
@Override public Iterable<PluginIndexConfiguration> getDocumentsForEntity(@Nonnull final String entityKey) { return byEntityKeyCache.get(entityKey); }
public List<IssueLink> getOutwardLinks(Long sourceId) { if (sourceId == null) { return ImmutableList.of(); } return ImmutableList.copyOf(outwardLinkCache.get(sourceId)); }
public List<IssueLink> getInwardLinks(Long destinationId) { if (destinationId == null) { return ImmutableList.of(); } return ImmutableList.copyOf(inwardLinkCache.get(destinationId)); }
public void cancelTaskIfRunningLocally(@Nonnull final Long taskId) { Future<?> future = futureMap.get(taskId); if (future != null) { future.cancel(false); } }
@Override public List<GenericValue> getSchemes(final GenericValue project) throws GenericEntityException { if (project == null) { throw new IllegalArgumentException("Cannot get schemes for null project"); } //only cache project associations return projectSchemeCache.get(project.getLong("id")); }
public Option findByOptionId(Long optionId) { if (optionId == null) { return null; } return optionCache.get(optionId).getValue(); }
@Override public int getUserCount(@Nonnull ApplicationKey key) { notNull("key", key); //This will return 0 if the role does not exist. //noinspection ConstantConditions return activeUsersCountForLicense.get(key); }
@Override public boolean hasColumnLayout(Long filterId) { // If the search request is not saved (loaded) it cannot have a column layout if (null == filterId) { return false; } final CacheObject<CacheableColumnLayout> filterColumnLayout = filterColumnLayoutCache.get(filterId); return filterColumnLayout.hasValue(); }
public Collection<CustomField> getCustomFieldObjectsByName(final String customFieldName) { List<Long> ids = customFieldsByName.get(customFieldName); List<CustomField> customFields = getCustomFieldsFromIds(ids); return Collections.unmodifiableList(customFields); }
@Nonnull @Override public Option<ApplicationRole> getRole(@Nonnull final ApplicationKey role) { notNull("role", role); //We know this can't be null because we use options to represent null. //noinspection ConstantConditions return appRoleCache.get(role); }
@Override public List<GenericValue> getEntities(final GenericValue scheme) throws GenericEntityException { final Long key = getSchemeEntityCacheKey(scheme); return Collections.unmodifiableList(schemeEntityCache.get(key).getCache()); }
@Nullable public T getCaseSensitive(final long directoryId, final String name) { return getCache().get(getKeyPreserveCase(directoryId, name)); }
private CacheableColumnLayout getUserColumnLayout(String username) { final String userKey = userKeyService.getKeyForUsername(username); return userColumnLayoutCache.get(wrap(userKey)); }
@Override public List<GenericValue> getEntities(GenericValue scheme) { return schemeIdToSecuritiesCache.get(new CacheKey(scheme.getLong("id"))); }
@SuppressWarnings ("ConstantConditions") public MailServer getMailServer(String name) { return mailServerCache.get(Option.option(name)).getOrNull(); }
@Override public ProjectComponent getProjectComponent(final Long projectComponentId) { Assertions.notNull("id", projectComponentId); final CacheObject<ProjectComponent> cacheObject = componentIdToComponentMap.get(projectComponentId); return cacheObject == null ? null : cacheObject.getValue(); }
@Override public SearchRequest getSearchRequest(@Nonnull final Long searchRequestId) { Assertions.notNull("searchRequestId", searchRequestId); return copySearch(cacheById.get(searchRequestId).getValue()); }
@Override @Nonnull public UserWithAttributes findByNameWithAttributes(final long directoryId, final String userName) throws UserNotFoundException { final OfBizUser user = findOfBizUser(directoryId, userName); final Attributes attributes = userAttributesCache.get(new AttributeKey(directoryId, user.getId())); return new DelegatingUserWithAttributes(user, attributes); }