Class NPMRegistry
- All Implemented Interfaces:
Describable<NPMRegistry>
,Serializable
Holder of all informations about a npm public/private registry.
This class keep all necessary information to access a npm registry that must be stored in a user config file. Typically information are:
- the registry URL
- list of scope for the registry, used typical in private registry
- account credentials to access the registry
- Since:
- 1.0
- Author:
- Nikolas Falco
- See Also:
-
Nested Class Summary
-
Constructor Summary
ConstructorDescriptionNPMRegistry
(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. -
Method Summary
Methods inherited from class hudson.model.AbstractDescribableImpl
getDescriptor
-
Constructor Details
-
NPMRegistry
Default constructor.- Parameters:
url
- url of a npm registrycredentialsId
- credentials identifierscopes
- url-safe characters, no leading dots or underscores
-
NPMRegistry
@DataBoundConstructor public NPMRegistry(@NonNull String url, String credentialsId, boolean hasScopes, String scopes) Default constructor used by jelly page for the optional block.- Parameters:
url
- url of a npm registrycredentialsId
- credentials identifierhasScopes
- if this registry was designed for a specific scopescopes
- url-safe characters, no leading dots or underscores
-
-
Method Details
-
getUrl
Get the registry URL- Returns:
- the registry URL
-
getScopes
Get list of scope for this registry.The scope are not prefixed with @ character.
- Returns:
- a space separated list of scope.
-
isHasScopes
public boolean isHasScopes() -
getScopesAsList
Provide a list of scope for this registry.The scope are not prefixed with @ character.
- Returns:
- list of scope.
-
getCredentialsId
Get list of scope for this registry.The scope are not prefixed with @ character.
- Returns:
- a space separated list of scope.
-
doVerify
Perform the validation of current registry.If validation pass then no
VerifyConfigProviderException
will be raised.- Throws:
VerifyConfigProviderException
- in case this configuration is not valid.
-
toString
-