Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,11 @@ if(hasProperty("java6Home")) {
jars.add(it.path)
}
}
new File(java_bin_dir).eachFileRecurse {
if (it.path =~/\.jar$/) {
jars.add(it.path)
}
}
} catch (FileNotFoundException e) {
// do nothing. The check below will fail the build
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,25 +22,18 @@
* <p>
* This interface allows read access to fields which are specific to admin scripts.
*/
public interface AdminScriptResource extends RepositoryResource {
public interface AdminScriptResource extends RepositoryResource, ApplicableToProduct {

/**
* Get the language that the script is written in
*
*
* @return the language the script is written in, or null if it has not been set
*/
public String getScriptLanguage();

/**
* Gets the appliesTo field associated with the resource
*
* @return The appliesTo field associated with the resource, or null if it has not been set
*/
public String getAppliesTo();

/**
* Gets the list of required features for this admin script
*
*
* @return The list of required features for this admin script, or null if no features are required
*/
public Collection<String> getRequireFeature();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@
* <p>
* This interface allows read access to fields which are specific to config snippets.
*/
public interface ConfigSnippetResource extends RepositoryResource {
public interface ConfigSnippetResource extends RepositoryResource, ApplicableToProduct {

/**
* Gets the list of required features for this config snippet
*
*
* @return The list of required features for this config snippet, or null if no features are required
*/
public Collection<String> getRequireFeature();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
* <p>
* This interface allows read access to fields which are specific to features.
*/
public interface EsaResource extends RepositoryResource {
public interface EsaResource extends RepositoryResource, ApplicableToProduct {

/**
* Gets the symbolic name of the feature
Expand Down Expand Up @@ -62,13 +62,6 @@ public interface EsaResource extends RepositoryResource {
*/
public String getLowerCaseShortName();

/**
* Gets the appliesTo field associated with the resource
*
* @return The appliesTo field associated with the resource, or null if it has not been set
*/
public String getAppliesTo();

/**
* Returns the value of the ibmProvisionCapability field (from the
* "IBM-Provision-Capability" header in the ESA's manifest) which gives
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,25 +23,18 @@
* <p>
* This interface allows read access to fields which are specific to ifixes.
*/
public interface IfixResource extends RepositoryResource {
public interface IfixResource extends RepositoryResource, ApplicableToProduct {

/**
* Gets the list of APAR IDs which are provided in this ifix resource
*
*
* @return the list of APAR IDs, or null if no APAR IDs are provided
*/
public Collection<String> getProvideFix();

/**
* Gets the appliesTo field associated with the resource
*
* @return The appliesTo field associated with the resource, or null if it has not been set
*/
public String getAppliesTo();

/**
* Gets the modified date of the most recently modified file to be replaced by the update
*
*
* @return the date, or null if it has not been set
*/
public Date getDate();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,6 @@
* <p>
* Products represented by this interface can either be of type {@link ResourceType#INSTALL} or {@link ResourceType#ADDON}.
*/
public interface ProductResource extends ProductRelatedResource {

/**
* Gets the appliesTo field associated with the resource
*
* @return The appliesTo field associated with the resource, or null if it has not been set
*/
public String getAppliesTo();
public interface ProductResource extends ProductRelatedResource, ApplicableToProduct {

}
Original file line number Diff line number Diff line change
Expand Up @@ -26,18 +26,11 @@
* <p>
* Samples represented by this interface can either be of type {@link ResourceType#PRODUCTSAMPLE} or {@link ResourceType#OPENSOURCE}.
*/
public interface SampleResource extends RepositoryResource {

/**
* Gets the appliesTo field associated with the resource
*
* @return The appliesTo field associated with the resource, or null if it has not been set
*/
public String getAppliesTo();
public interface SampleResource extends RepositoryResource, ApplicableToProduct {

/**
* Gets the list of required features for this sample
*
*
* @return The list of required features for this sample, or null if it has not been set
*/
public Collection<String> getRequireFeature();
Expand All @@ -46,7 +39,7 @@ public interface SampleResource extends RepositoryResource {
* Gets the short name for this sample
* <p>
* The short name should be the name of the server included in the sample.
*
*
* @return The short name for this sample, or null if it has not been set
*/
public String getShortName();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@

import com.ibm.ws.repository.common.enums.ResourceType;
import com.ibm.ws.repository.connections.RepositoryConnection;
import com.ibm.ws.repository.exceptions.RepositoryResourceCreationException;
import com.ibm.ws.repository.resources.internal.AdminScriptResourceImpl;
import com.ibm.ws.repository.resources.internal.ConfigSnippetResourceImpl;
import com.ibm.ws.repository.resources.internal.EsaResourceImpl;
Expand Down Expand Up @@ -62,4 +63,27 @@ public static ToolResourceWritable createTool(RepositoryConnection repoConnectio
return new ToolResourceImpl(repoConnection);
}

public static RepositoryResourceWritable createResource(RepositoryConnection repoConnection, ResourceType type) throws RepositoryResourceCreationException {
switch (type) {
case ADDON:
case INSTALL:
return createProduct(repoConnection, type);
case ADMINSCRIPT:
return createAdminScript(repoConnection);
case CONFIGSNIPPET:
return createConfigSnippet(repoConnection);
case FEATURE:
return createEsa(repoConnection);
case IFIX:
return createIfix(repoConnection);
case OPENSOURCE:
case PRODUCTSAMPLE:
return createSample(repoConnection, type);
case TOOL:
return createTool(repoConnection);
default:
throw new RepositoryResourceCreationException("Can not create an asset of type " + type, null);
}
}

}