public class NPMRegistry extends hudson.model.AbstractDescribableImpl<NPMRegistry> implements Serializable
This class keep all necessary information to access a npm registry that must be stored in a user config file. Typically information are:
| Modifier and Type | Class and Description |
|---|---|
static class |
NPMRegistry.DescriptorImpl |
| Constructor and Description |
|---|
NPMRegistry(String url,
String credentialsId,
boolean hasScopes,
String scopes)
Default constructor used by jelly page for the optional block.
|
NPMRegistry(String url,
String credentialsId,
String scopes)
Default constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
doVerify()
Perform the validation of current registry.
|
String |
getCredentialsId()
Get list of scope for this registry.
|
String |
getScopes()
Get list of scope for this registry.
|
List<String> |
getScopesAsList()
Provide a list of scope for this registry.
|
String |
getUrl()
Get the registry URL
|
boolean |
isHasScopes() |
String |
toString() |
public NPMRegistry(@Nonnull String url, String credentialsId, String scopes)
url - url of a npm registrycredentialsId - credentials identifierscopes - url-safe characters, no leading dots or underscores@DataBoundConstructor public NPMRegistry(@Nonnull String url, String credentialsId, boolean hasScopes, String scopes)
url - url of a npm registrycredentialsId - credentials identifierhasScopes - if this registry was designed for a specific scopescopes - url-safe characters, no leading dots or underscorespublic String getScopes()
The scope are not prefixed with @ character.
public boolean isHasScopes()
public List<String> getScopesAsList()
The scope are not prefixed with @ character.
public String getCredentialsId()
The scope are not prefixed with @ character.
public void doVerify()
throws VerifyConfigProviderException
If validation pass then no VerifyConfigProviderException will be
raised.
VerifyConfigProviderException - in case this configuration is not valid.Copyright © 2016–2018. All rights reserved.