code stringlengths 73 34.1k | label stringclasses 1
value |
|---|---|
public SuccessResponse deleteAttachment(DeleteAlertAttachmentRequest params) throws ApiException {
String identifier = params.getIdentifier();
Long attachmentId = params.getAttachmentId();
String alertIdentifierType = params.getAlertIdentifierType().getValue();
String user = params.getUser();
Obje... | java |
public ListAlertsResponse listAlerts(ListAlertsRequest params) throws ApiException {
Integer limit = params.getLimit();
String sort = params.getSort().getValue();
Integer offset = params.getOffset();
String order = params.getOrder().getValue();
String query = params.getQuery();
String searchIden... | java |
public ListAlertNotesResponse listNotes(ListAlertNotesRequest params) throws ApiException {
String identifier = params.getIdentifier();
String identifierType = params.getIdentifierType().getValue();
String offset = params.getOffset();
String direction = params.getDirection().getValue();
Integer limi... | java |
public ListSavedSearchResponse listSavedSearches() throws ApiException {
Object localVarPostBody = null;
// create path and map variables
String localVarPath = "/v2/alerts/saved-searches";
// query params
List<Pair> localVarQueryParams = new ArrayList<Pair>();
Map<String, String> localVarHea... | java |
public List<ScheduleRotation> getRotations() {
if (getTimeZone() != null && rotations != null)
for (ScheduleRotation scheduleRotation : rotations)
scheduleRotation.setScheduleTimeZone(getTimeZone());
return rotations;
} | java |
@JsonProperty("participants")
public List<String> getParticipantsNames() {
if (participants == null)
return null;
List<String> participantList = new ArrayList<String>();
for (ScheduleParticipant participant : participants)
participantList.add(participant.getParticipan... | java |
public void setConnectionValues(final Google google, final ConnectionValues values) {
final UserInfo userInfo = google.oauth2Operations().getUserinfo();
values.setProviderUserId(userInfo.getId());
values.setDisplayName(userInfo.getName());
values.setProfileUrl(userInfo.getLink());
values.setImageUrl... | java |
public UserProfile fetchUserProfile(final Google google) {
final UserInfo userInfo = google.oauth2Operations().getUserinfo();
return new UserProfileBuilder().setUsername(userInfo.getId())
.setId(userInfo.getId())
.setEmail(userInfo.getEmail())
.setName(userInfo.getName())
.setFirstName(u... | java |
public String getImageUrl() {
if (thumbnailUrl != null) {
return thumbnailUrl;
}
if (image != null) {
return image.url;
}
return null;
} | java |
public String getAccountEmail() {
if (emails != null) {
for (final Entry<String, String> entry : emails.entrySet()) {
if (entry.getValue().equals("account")) {
return entry.getKey();
}
}
}
return null;
} | java |
public static String enumToString(final Enum<?> value) {
if (value == null) {
return null;
}
final String underscored = value.name();
final StringBuilder sb = new StringBuilder();
for (int i = 0; i < underscored.length(); i++) {
final char c = underscored.charAt(i);
if (c == '_'... | java |
public MockResponse handleCreate(String path, String s) {
MockResponse response = new MockResponse();
AttributeSet features = AttributeSet.merge(attributeExtractor.fromPath(path), attributeExtractor.fromResource(s));
map.put(features, s);
response.setBody(s);
response.setResponse... | java |
public MockResponse handlePatch(String path, String s) {
MockResponse response = new MockResponse();
String body = doGet(path);
if (body == null) {
response.setResponseCode(404);
} else {
try {
JsonNode patch = context.getMapper().readTree(s);
... | java |
public MockResponse handleDelete(String path) {
MockResponse response = new MockResponse();
List<AttributeSet> items = new ArrayList<>();
AttributeSet query = attributeExtractor.extract(path);
for (Map.Entry<AttributeSet, String> entry : map.entrySet()) {
if (entry.getKey().... | java |
@Override
public List<ExportFormat> exportFormats(IssueServiceConfiguration issueServiceConfiguration) {
return issueExportServiceFactory.getIssueExportServices().stream()
.map(IssueExportService::getExportFormat)
.collect(Collectors.toList());
} | java |
public TemplateInstanceExecution templateInstanceExecution(String sourceName, ExpressionEngine expressionEngine) {
// Transforms each parameter in a name/value pair, using only the source name as input
Map<String, String> sourceNameInput = Collections.singletonMap("sourceName", sourceName);
Map<... | java |
@JsonIgnore
public Map<String, Set<String>> getGroupingSpecification() {
Map<String, Set<String>> result = new LinkedHashMap<>();
if (!StringUtils.isBlank(grouping)) {
String[] groups = split(grouping, '|');
for (String group : groups) {
String[] groupSpec = s... | java |
@JsonIgnore
public Set<String> getExcludedTypes() {
if (StringUtils.isBlank(exclude)) {
return Collections.emptySet();
} else {
return Sets.newHashSet(
Arrays.asList(
StringUtils.split(exclude, ",")
).stream(... | java |
@RequestMapping(value = "ldap-mapping", method = RequestMethod.GET)
public Resources<LDAPMapping> getMappings() {
securityService.checkGlobalFunction(AccountGroupManagement.class);
return Resources.of(
accountGroupMappingService.getMappings(LDAPExtensionFeature.LDAP_GROUP_MAPPING)
... | java |
@RequestMapping(value = "ldap-mapping/create", method = RequestMethod.GET)
public Form getMappingCreationForm() {
securityService.checkGlobalFunction(AccountGroupManagement.class);
return AccountGroupMapping.form(
accountService.getAccountGroups()
);
} | java |
@Override
public boolean canEdit(ProjectEntity entity, SecurityService securityService) {
return securityService.isProjectFunctionGranted(entity, PromotionRunCreate.class);
} | java |
@RequestMapping(value = "predefinedPromotionLevels", method = RequestMethod.GET)
public Resources<PredefinedPromotionLevel> getPredefinedPromotionLevelList() {
return Resources.of(
predefinedPromotionLevelService.getPredefinedPromotionLevels(),
uri(on(getClass()).getPredefine... | java |
@RequestMapping(value = "root", method = RequestMethod.GET)
public Resources<UIEvent> getEvents(
@RequestParam(required = false, defaultValue = "0") int offset,
@RequestParam(required = false, defaultValue = "20") int count) {
// Gets the events
Resources<UIEvent> resources =... | java |
@Override
public void store(String key, byte[] payload) throws IOException {
try {
Cipher sym = Cipher.getInstance("AES");
sym.init(Cipher.ENCRYPT_MODE, masterKey);
try (
FileOutputStream fos = new FileOutputStream(getFileFor(key));
... | java |
@RequestMapping(value = "configurations", method = RequestMethod.GET)
public Resources<CombinedIssueServiceConfiguration> getConfigurationList() {
return Resources.of(
configurationService.getConfigurationList(),
uri(on(getClass()).getConfigurationList())
)
... | java |
@RequestMapping(value = "configurations/create", method = RequestMethod.GET)
public Form getConfigurationForm() {
return CombinedIssueServiceConfiguration.form(
configurationService.getAvailableIssueServiceConfigurations()
);
} | java |
public static void checkArgList(DataFetchingEnvironment environment, String... args) {
Set<String> actualArgs = getActualArguments(environment).keySet();
Set<String> expectedArgs = new HashSet<>(Arrays.asList(args));
if (!Objects.equals(actualArgs, expectedArgs)) {
throw new IllegalS... | java |
@JsonIgnore
public String getCuredBranchPath() {
String trim = StringUtils.trim(branchPath);
if ("/".equals(trim)) {
return trim;
} else {
return StringUtils.stripEnd(trim, "/");
}
} | java |
private void indexInTransaction(SVNRepository repository, SVNLogEntry logEntry) throws SVNException {
// Log values
long revision = logEntry.getRevision();
String author = logEntry.getAuthor();
String message = logEntry.getMessage();
Date date = logEntry.getDate();
// San... | java |
protected void index(SVNRepository repository, long from, long to, JobRunListener runListener) {
// Ordering
if (from > to) {
long t = from;
from = to;
to = t;
}
// Range
long min = from;
long max = to;
// Opens a transaction
... | java |
@Override
protected void configure(HttpSecurity http) throws Exception {
// Gets a secure random key for the remember be token key
SecureRandom random = new SecureRandom();
byte[] randomBytes = new byte[64];
random.nextBytes(randomBytes);
String rememberBeKey = new String(Hex... | java |
@Override
public JsonNode forStorage(AutoPromotionProperty value) {
return format(
MapBuilder.create()
.with("validationStamps", value.getValidationStamps().stream()
.map(Entity::id)
.collect(Collectors.t... | java |
public VersionInfo toInfo() {
return new VersionInfo(
parseDate(date),
display,
full,
branch,
build,
commit,
source,
sourceType
);
} | java |
public ExtensionFeatureOptions withDependency(ExtensionFeature feature) {
Set<String> existing = this.dependencies;
Set<String> newDependencies;
if (existing == null) {
newDependencies = new HashSet<>();
} else {
newDependencies = new HashSet<>(existing);
... | java |
@RequestMapping(value = "", method = RequestMethod.GET)
public Resources<Account> getAccounts() {
return Resources.of(
accountService.getAccounts(),
uri(on(getClass()).getAccounts())
)
.with(Link.CREATE, uri(on(AccountController.class).getCreationForm(... | java |
@RequestMapping(value = "actions", method = RequestMethod.GET)
public Resources<Action> getAccountMgtActions() {
return Resources.of(
extensionManager.getExtensions(AccountMgtActionExtension.class).stream()
.map(this::resolveExtensionAction)
.f... | java |
@RequestMapping(value = "create", method = RequestMethod.GET)
public Form getCreationForm() {
return Form.create()
.with(Form.defaultNameField())
.with(Text.of("fullName").length(100).label("Full name").help("Display name for the account"))
.with(Email.of("ema... | java |
@RequestMapping(value = "groups", method = RequestMethod.GET)
public Resources<AccountGroup> getAccountGroups() {
return Resources.of(
accountService.getAccountGroups(),
uri(on(getClass()).getAccountGroups())
)
.with(Link.CREATE, uri(on(AccountControll... | java |
protected Collection<ConfiguredIssueService> getConfiguredIssueServices(IssueServiceConfiguration issueServiceConfiguration) {
CombinedIssueServiceConfiguration combinedIssueServiceConfiguration = (CombinedIssueServiceConfiguration) issueServiceConfiguration;
return combinedIssueServiceConfiguration.get... | java |
@RequestMapping(value = "branches/{branchId}/update/bulk", method = RequestMethod.GET)
public Form bulkUpdate(@SuppressWarnings("UnusedParameters") @PathVariable ID branchId) {
return Form.create()
.with(
Replacements.of("replacements")
... | java |
public static <T> List<SelectableItem> listOf(
Collection<T> items,
Function<T, String> idFn,
Function<T, String> nameFn,
Predicate<T> selectedFn
) {
return items.stream()
.map(i ->
new SelectableItem(
... | java |
@Override
public void configureContentNegotiation(ContentNegotiationConfigurer configurer) {
configurer.favorParameter(false);
configurer.favorPathExtension(false);
} | java |
@Override
public IssueServiceConfiguration getConfigurationByName(String name) {
// Parsing of the name
String[] tokens = StringUtils.split(name, GitHubGitConfiguration.CONFIGURATION_REPOSITORY_SEPARATOR);
if (tokens == null || tokens.length != 2) {
throw new IllegalStateExceptio... | java |
@RequestMapping(value = "", method = RequestMethod.GET)
public Resource<ExtensionList> getExtensions() {
return Resource.of(
extensionManager.getExtensionList(),
uri(MvcUriComponentsBuilder.on(getClass()).getExtensions())
);
} | java |
public static <T> Decoration<T> of(Decorator<T> decorator, T data) {
Validate.notNull(decorator, "The decorator is required");
Validate.notNull(data, "The decoration data is required");
return new Decoration<>(decorator, data, null);
} | java |
public static <T> Decoration<T> error(Decorator<T> decorator, String error) {
Validate.notNull(decorator, "The decorator is required");
Validate.notBlank(error, "The decoration error is required");
return new Decoration<>(decorator, null, error);
} | java |
@RequestMapping(value = "configurations", method = RequestMethod.GET)
public Resources<StashConfiguration> getConfigurations() {
return Resources.of(
configurationService.getConfigurations(),
uri(on(getClass()).getConfigurations())
)
.with(Link.CREATE,... | java |
@RequestMapping(value = "changeLog/fileFilter/{projectId}/create", method = RequestMethod.GET)
public Form createChangeLogFileFilterForm(@SuppressWarnings("UnusedParameters") @PathVariable ID projectId) {
return Form.create()
.with(Text.of("name")
.label("Name")
... | java |
@RequestMapping(value = "", method = RequestMethod.GET)
public Resource<Info> info() {
return Resource.of(
infoService.getInfo(),
uri(on(getClass()).info())
)
// API links
.with("user", uri(on(UserController.class).getCurrentUser()))
... | java |
@RequestMapping(value = "application", method = RequestMethod.GET)
public Resources<ApplicationInfo> applicationInfo() {
return Resources.of(
applicationInfoService.getApplicationInfoList(),
uri(on(InfoController.class).applicationInfo())
);
} | java |
@Override
public boolean canEdit(ProjectEntity entity, SecurityService securityService) {
return securityService.isProjectFunctionGranted(entity.projectId(), ProjectConfig.class) &&
propertyService.hasProperty(
entity.getProject(),
SVNProjectCo... | java |
@Override
public void start() {
register(STATUS_PASSED);
register(STATUS_FIXED);
register(STATUS_DEFECTIVE);
register(STATUS_EXPLAINED, FIXED);
register(STATUS_INVESTIGATING, DEFECTIVE, EXPLAINED, FIXED);
register(STATUS_INTERRUPTED, INVESTIGATING, FIXED);
reg... | java |
protected <T> List<? extends Decoration> getDecorations(ProjectEntity entity, Decorator<T> decorator) {
try {
return decorator.getDecorations(entity);
} catch (Exception ex) {
return Collections.singletonList(
Decoration.error(decorator, getErrorMessage(ex))
... | java |
public static List<String> asList(String text) {
if (StringUtils.isBlank(text)) {
return Collections.emptyList();
} else {
try {
return IOUtils.readLines(new StringReader(text));
} catch (IOException e) {
throw new RuntimeException("Can... | java |
public static String toHexString(byte[] bytes, int start, int len) {
StringBuilder buf = new StringBuilder();
for (int i = 0; i < len; i++) {
int b = bytes[start + i] & 0xFF;
if (b < 16) buf.append('0');
buf.append(Integer.toHexString(b));
}
return buf... | java |
@Override
public boolean canEdit(ProjectEntity entity, SecurityService securityService) {
return securityService.isProjectFunctionGranted(entity, ProjectConfig.class) &&
propertyService.hasProperty(
entity,
SVNBranchConfigurationPropertyType.cl... | java |
@RequestMapping(value = "configurations/descriptors", method = RequestMethod.GET)
public Resources<ConfigurationDescriptor> getConfigurationsDescriptors() {
return Resources.of(
jenkinsService.getConfigurationDescriptors(),
uri(on(getClass()).getConfigurationsDescriptors())
... | java |
protected T injectCredentials(T configuration) {
T oldConfig = findConfiguration(configuration.getName()).orElse(null);
T target;
if (StringUtils.isBlank(configuration.getPassword())) {
if (oldConfig != null && StringUtils.equals(oldConfig.getUser(), configuration.getUser())) {
... | java |
@RequestMapping(value = "predefinedValidationStamps", method = RequestMethod.GET)
public Resources<PredefinedValidationStamp> getPredefinedValidationStampList() {
return Resources.of(
predefinedValidationStampService.getPredefinedValidationStamps(),
uri(on(getClass()).getPred... | java |
@RequestMapping(value = "", method = RequestMethod.GET)
public Resources<DescribedForm> configuration() {
securityService.checkGlobalFunction(GlobalSettings.class);
List<DescribedForm> forms = settingsManagers.stream()
.sorted((o1, o2) -> o1.getTitle().compareTo(o2.getTitle()))
... | java |
public OptionalLong extractRevision(String buildName) {
// Gets the regex for the pattern
String regex = getRegex();
// Matching
Matcher matcher = Pattern.compile(regex).matcher(buildName);
if (matcher.matches()) {
String token = matcher.group(1);
return O... | java |
public static OntrackSVNIssueInfo empty(SVNConfiguration configuration) {
return new OntrackSVNIssueInfo(
configuration,
null,
null,
Collections.emptyList(),
Collections.emptyList()
);
} | java |
@Override
public boolean canEdit(ProjectEntity entity, SecurityService securityService) {
switch (entity.getProjectEntityType()) {
case BUILD:
return securityService.isProjectFunctionGranted(entity, BuildCreate.class);
case PROMOTION_RUN:
return securi... | java |
public static void main(String[] args) {
// PID file
File pid = new File("ontrack.pid");
// Runs the application
SpringApplication application = new SpringApplication(Application.class);
application.addListeners(new ApplicationPidFileWriter(pid));
application.run(args);... | java |
public boolean hasValidationStamp(String name, String status) {
return (StringUtils.equals(name, getValidationStamp().getName()))
&& isRun()
&& (
StringUtils.isBlank(status)
|| StringUtils.equals(status, getLastStatus().getStatusID().getId(... | java |
protected Stream<Branch> getSVNConfiguredBranches() {
return structureService.getProjectList()
.stream()
// ...which have a SVN configuration
.filter(project -> propertyService.hasProperty(project, SVNProjectConfigurationPropertyType.class))
// ...... | java |
@RequestMapping(value = "globals", method = RequestMethod.GET)
public Resources<GlobalPermission> getGlobalPermissions() {
return Resources.of(
accountService.getGlobalPermissions(),
uri(on(PermissionController.class).getGlobalPermissions())
).with("_globalRoles", uri... | java |
@RequestMapping(value = "globals/roles", method = RequestMethod.GET)
public Resources<GlobalRole> getGlobalRoles() {
return Resources.of(
rolesService.getGlobalRoles(),
uri(on(PermissionController.class).getGlobalRoles())
);
} | java |
@RequestMapping(value = "projects/roles", method = RequestMethod.GET)
public Resources<ProjectRole> getProjectRoles() {
return Resources.of(
rolesService.getProjectRoles(),
uri(on(PermissionController.class).getProjectRoles())
);
} | java |
protected Set<File> jrxmlFilesToCompile(SourceMapping mapping) throws MojoExecutionException {
if (!sourceDirectory.isDirectory()) {
String message = sourceDirectory.getName() + " is not a directory";
if (failOnMissingSourceDirectory) {
throw new IllegalArgumentException(message);
}
else {
log.war... | java |
private void checkOutDirWritable(File outputDirectory) throws MojoExecutionException {
if (!outputDirectory.exists()) {
checkIfOutputCanBeCreated();
checkIfOutputDirIsWritable();
if (verbose) {
log.info("Output dir check OK");
}
}
else if (!outputDirectory.canWrite()) {
throw new MojoExecutionE... | java |
@Override
public Void call() throws Exception {
OutputStream out = null;
InputStream in = null;
try {
out = new FileOutputStream(destination);
in = new FileInputStream(source);
JasperCompileManager.compileReportToStream(in, out);
if (verbose) {... | java |
public static Bitmap screenshot(int width, int height) {
if (METHOD_screenshot_II == null) {
Log.e(TAG, "screenshot method was not found.");
return null;
}
return (Bitmap) CompatUtils.invoke(null, null, METHOD_screenshot_II, width, height);
} | java |
public static Bitmap createScreenshot(Context context) {
if (!hasScreenshotPermission(context)) {
LogUtils.log(ScreenshotUtils.class, Log.ERROR, "Screenshot permission denied.");
return null;
}
final WindowManager windowManager =
(WindowManager) context.g... | java |
public void reset(AccessibilityNodeInfoCompat newNode) {
if (mNode != newNode && mNode != null && mOwned) {
mNode.recycle();
}
mNode = newNode;
mOwned = true;
} | java |
public void init(Context context) {
if (!mNotFoundClassesMap.isEmpty()) {
buildInstalledPackagesCache(context);
}
mPackageMonitor.register(context);
} | java |
private void buildInstalledPackagesCache(Context context) {
final List<PackageInfo> installedPackages =
context.getPackageManager().getInstalledPackages(0);
for (PackageInfo installedPackage : installedPackages) {
addInstalledPackageToCache(installedPackage.packageName);
... | java |
private void processSwatch(Bitmap image) {
final Map<Integer, Integer> colorHistogram = processLuminanceData(image);
extractFgBgData(colorHistogram);
// Two-decimal digits of precision for the contrast ratio
mContrastRatio = Math.round(
ContrastUtils.calculateContrastRat... | java |
private void extractFgBgData(Map<Integer, Integer> colorHistogram) {
if (colorHistogram.isEmpty()) {
// An empty histogram indicates we've encountered a 0px area image. It has no luminance.
mBackgroundLuminance = mForegroundLuminance = 0;
mBackgroundColor = Color.BLACK;
... | java |
public static AccessibilityNodeInfoCompat focusSearch(
AccessibilityNodeInfoCompat node, int direction) {
final AccessibilityNodeInfoRef ref = AccessibilityNodeInfoRef.unOwned(node);
switch (direction) {
case SEARCH_FORWARD: {
if (!ref.nextInOrder()) {
... | java |
public static boolean performNavigationByDOMObject(
AccessibilityNodeInfoCompat node, int direction) {
final int action = (direction == DIRECTION_FORWARD)
? AccessibilityNodeInfoCompat.ACTION_NEXT_HTML_ELEMENT
: AccessibilityNodeInfoCompat.ACTION_PREVIOUS_HTML_ELEMENT... | java |
public static boolean supportsWebActions(AccessibilityNodeInfoCompat node) {
return AccessibilityNodeInfoUtils.supportsAnyAction(node,
AccessibilityNodeInfoCompat.ACTION_NEXT_HTML_ELEMENT,
AccessibilityNodeInfoCompat.ACTION_PREVIOUS_HTML_ELEMENT);
} | java |
public static boolean hasLegacyWebContent(AccessibilityNodeInfoCompat node) {
if (node == null) {
return false;
}
if (!supportsWebActions(node)) {
return false;
}
// ChromeVox does not have sub elements, so if the parent element also has web content
... | java |
public static boolean shouldFocusNode(Context context, AccessibilityNodeInfoCompat node) {
if (node == null) {
return false;
}
if (!isVisibleOrLegacy(node)) {
LogUtils.log(AccessibilityNodeInfoUtils.class, Log.VERBOSE,
"Don't focus, node is not visibl... | java |
private static boolean hasMatchingAncestor(
Context context, AccessibilityNodeInfoCompat node, NodeFilter filter) {
if (node == null) {
return false;
}
final AccessibilityNodeInfoCompat result = getMatchingAncestor(context, node, filter);
if (result == null) {
... | java |
private static boolean isScrollable(AccessibilityNodeInfoCompat node) {
if (node.isScrollable()) {
return true;
}
return supportsAnyAction(node,
AccessibilityNodeInfoCompat.ACTION_SCROLL_FORWARD,
AccessibilityNodeInfoCompat.ACTION_SCROLL_BACKWARD);
... | java |
private static boolean hasText(AccessibilityNodeInfoCompat node) {
if (node == null) {
return false;
}
return (!TextUtils.isEmpty(node.getText())
|| !TextUtils.isEmpty(node.getContentDescription()));
} | java |
public static boolean isTopLevelScrollItem(Context context, AccessibilityNodeInfoCompat node) {
if (node == null) {
return false;
}
AccessibilityNodeInfoCompat parent = null;
try {
parent = node.getParent();
if (parent == null) {
// N... | java |
public static boolean isEdgeListItem(
Context context, AccessibilityNodeInfoCompat node, int direction, NodeFilter filter) {
if (node == null) {
return false;
}
if ((direction <= 0) && isMatchingEdgeListItem(context, node,
NodeFocusFinder.SEARCH_BACKWARD,... | java |
private static boolean isMatchingEdgeListItem(Context context,
AccessibilityNodeInfoCompat cursor, int direction, NodeFilter filter) {
AccessibilityNodeInfoCompat ancestor = null;
AccessibilityNodeInfoCompat searched = null;
AccessibilityNodeInfoCompat searchedAncestor = null;
... | java |
public static AccessibilityNodeInfoCompat searchFromBfs(
Context context, AccessibilityNodeInfoCompat node, NodeFilter filter) {
if (node == null) {
return null;
}
final LinkedList<AccessibilityNodeInfoCompat> queue =
new LinkedList<AccessibilityNodeInfoC... | java |
public static AccessibilityNodeInfoCompat searchFromInOrderTraversal(
Context context, AccessibilityNodeInfoCompat root, NodeFilter filter, int direction) {
AccessibilityNodeInfoCompat currentNode = NodeFocusFinder.focusSearch(root, direction);
final HashSet<AccessibilityNodeInfoCompat> see... | java |
public boolean isCompatible(DefaultVersionRange otherRange)
{
int lowerCompare = compareTo(this.lowerBound, this.lowerBoundInclusive, otherRange.lowerBound,
otherRange.lowerBoundInclusive, false);
int upperCompare = compareTo(this.upperBound, this.upperBoundInclusive, otherRange.upperBou... | java |
@Deprecated
protected Class<?> getGenericRole(Field field)
{
Type type = field.getGenericType();
if (type instanceof ParameterizedType) {
ParameterizedType pType = (ParameterizedType) type;
Type[] types = pType.getActualTypeArguments();
if (types.length > 0 &... | java |
private DefaultLocalExtension createExtension(Extension extension)
{
DefaultLocalExtension localExtension = new DefaultLocalExtension(this, extension);
localExtension.setFile(this.storage.getNewExtensionFile(localExtension.getId(), localExtension.getType()));
return localExtension;
} | java |
private ExtensionDependency getDependency(Extension extension, String dependencyId)
{
for (ExtensionDependency dependency : extension.getDependencies()) {
if (dependency.getId().equals(dependencyId)) {
return dependency;
}
}
return null;
} | java |
private Set<InstalledExtension> getReplacedInstalledExtensions(Extension extension, String namespace)
throws IncompatibleVersionConstraintException, ResolveException, InstallException
{
// If a namespace extension already exist on root, fail the install
if (namespace != null) {
c... | java |
public static boolean verify(SignerInformation signer,
CertifiedPublicKey certKey, BcContentVerifierProviderBuilder contentVerifierProviderBuilder,
DigestFactory digestProvider) throws CMSException
{
if (certKey == null) {
throw new CMSException("No certified key for proceeding t... | java |
public void setProperties(Map<String, Object> properties)
{
this.properties.clear();
this.properties.putAll(properties);
} | java |
public <T> Cache<T> createNewCache(CacheConfiguration config, String cacheHint) throws CacheException
{
CacheFactory cacheFactory;
try {
cacheFactory = this.componentManager.getInstance(CacheFactory.class, cacheHint);
} catch (ComponentLookupException e) {
throw new C... | java |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.