Retrieves X509Extension by given oid.

@param oid the oid of the extension to retrieve.
@return the extension with the specified oid. Can be null if
there is no extension with such oid.
967579
public X509Extension get(String oid) {
	if (oid == null) {
	    throw new IllegalArgumentException(i18n.getMessage("oidNull"));
	}
	return (X509Extension)this.extensions.get(oid);
    }
241073
public String getExtension(String url) {
		int dotIndex = url.lastIndexOf('.');
		String extension = null;
		if (dotIndex > 0) {
			extension = url.substring(dotIndex + 1);
		}
		return extension;
	}
499105
@Override
	public String getExtensionPointId() {
		final String sourceMethod = "getExtensionPointId"; //$NON-NLS-1$
		boolean isTraceLogging = log.isLoggable(Level.FINER);
		if (isTraceLogging) {
			log.entering(AggregatorExtension.class.getName(), sourceMethod);
			log.exiting(AggregatorExtension.class.getName(), sourceMethod, extensionPointId);
		}
		return extensionPointId;
	}
1033309
private String getExtension(String fileName) {
		if (fileName == null) {
            return null;
        }

		String ext = null;
		int i = fileName.lastIndexOf('.');

		if (i > 0 && i < fileName.length() - 1) {
			ext = fileName.substring(i + 1).toLowerCase();
		}
		return ext;
	}
893848
protected boolean tryInstallExtension(ExtensionId extensionId, String namespace)
    {
        DefaultExtensionPlanTree currentTree = this.extensionTree.clone();

        try {
            installExtension(extensionId, namespace, currentTree);

            setExtensionTree(currentTree);

            return true;
        } catch (InstallException e) {
            if (getRequest().isVerbose()) {
                this.logger.info(FAILED_INSTALL_MESSAGE, extensionId, namespace, e);
            } else {
                this.logger.debug(FAILED_INSTALL_MESSAGE, extensionId, namespace, e);
            }
        }

        return false;
    }
701842
public <T> T getLocalExtension(Class<T> extensionType) {
        Object obj = extensions.get(extensionType);
        if (null != obj) {
            return extensionType.cast(obj);
        }
        return null;
    }
285807
public <T extends Extension> T getExtension(Class<T> clazz) {
        if (clazz != null) {
            Extension extension = extensionsMap.get(clazz);
            if (extension != null) {
                return clazz.cast(extension);
            }
        }
        return null;
    }
1267431
protected Response getConfiguration(final String extensionId, final Sid accountSid, final MediaType responseType) {
        //Parameter "extensionId" could be the extension Sid or extension name.

        ExtensionConfiguration extensionConfiguration = null;
        ExtensionConfiguration extensionAccountConfiguration = null;
        Sid extensionSid = null;
        String extensionName = null;

        if(Sid.pattern.matcher(extensionId).matches()){
            extensionSid = new Sid(extensionId);
        } else {
            extensionName = extensionId;
        }

        if (Sid.pattern.matcher(extensionId).matches()) {
            try {
                extensionConfiguration = extensionsConfigurationDao.getConfigurationBySid(extensionSid);
            } catch (Exception e) {
                return status(NOT_FOUND).build();
            }
        } else {
            try {
                extensionConfiguration = extensionsConfigurationDao.getConfigurationByName(extensionName);
            } catch (Exception e) {
                return status(NOT_FOUND).build();
            }
        }

        if (accountSid!=null) {
            if(extensionSid == null ){
                extensionSid = extensionConfiguration.getSid();
            }
            try {
                extensionAccountConfiguration = extensionsConfigurationDao.getAccountExtensionConfiguration(accountSid.toString(), extensionSid.toString());
                extensionConfiguration.setConfigurationData(extensionAccountConfiguration.getConfigurationData(), extensionAccountConfiguration.getConfigurationType());
            } catch (Exception e) {
                return status(NOT_FOUND).build();
            }
        }

        if (extensionConfiguration == null) {
            return status(NOT_FOUND).build();
        } else {
            if (APPLICATION_XML_TYPE.equals(responseType)) {
                final RestCommResponse response = new RestCommResponse(extensionConfiguration);
                return ok(xstream.toXML(response), APPLICATION_XML).build();
            } else if (APPLICATION_JSON_TYPE.equals(responseType)) {
                return ok(gson.toJson(extensionConfiguration), APPLICATION_JSON).build();
            } else {
                return null;
            }
        }
    }
504310
public static final String id(String id) {
		if (StringUtils.startsWith(id, PREFIX)) {
			return PREFIX.concat(Utils.noSpaces(Utils.stripAndTrim(id.replaceAll(PREFIX, ""), " "), "-"));
		} else if (id != null) {
			return PREFIX.concat(Utils.noSpaces(Utils.stripAndTrim(id, " "), "-"));
		} else {
			return null;
		}
	}
152205
@StaplerDispatchable
    public ExtensionList getExtensionList(String extensionType) throws ClassNotFoundException {
        return getExtensionList(pluginManager.uberClassLoader.loadClass(extensionType));
    }
577959
public Collection<String> getKeysForExtension(XExtension extension) {
		Collection<XAttribute> extensionCollection = getAttributesForExtension(extension);
		Set<String> keySet = new HashSet<String>();
		for(XAttribute attribute : extensionCollection) {
			keySet.add(attribute.getKey());
		}
		return Collections.unmodifiableCollection(keySet);
	}
493519
@Override
    public Extension resolve(ExtensionId extensionId) throws ResolveException
    {
        try {
            return resolve(extensionId.getId(), extensionId.getVersion());
        } catch (ResourceNotFoundException e) {
            throw new ExtensionNotFoundException("Could not find extension [" + extensionId + "]", e);
        } catch (Exception e) {
            throw new ResolveException("Failed to create extension object for extension [" + extensionId + "]", e);
        }
    }
621012
public String convertExtensionToMediaType(String extension) {
        ProvFormat format = extensionRevMap.get(extension);
        if (format == null)
            return null;
        return mimeTypeMap.get(format);
    }
758161
@Override
	public ZooPC readObject(long oid) {
	    final DataDeSerializer dds = ddsPool.get();
		final ZooPC pci = readObject(dds, oid);
		ddsPool.offer(dds);
		return pci;
	}
259879
public IssuerAlternativeNameExtension getIssuerAltNameExtension()
        throws IOException {
        Object obj = getExtension(PKIXExtensions.IssuerAlternativeName_Id);
        return (IssuerAlternativeNameExtension)obj;
    }
572350
public OvhModuleList moduleList_id_GET(Long id) throws IOException {
		String qPath = "/hosting/web/moduleList/{id}";
		StringBuilder sb = path(qPath, id);
		String resp = execN(qPath, "GET", sb.toString(), null);
		return convertTo(resp, OvhModuleList.class);
	}
424271
public XExtension getByName(String name) {
                for (XExtension ext : extensionList) {
                        if (ext.getName().equals(name)) {
                                return ext;
                        }
                }
                return null;
        }