Class AbstractSourceableOsidObject
java.lang.Object
net.okapia.osid.jamocha.spi.AbstractIdentifiable
net.okapia.osid.jamocha.spi.AbstractOsidObject
net.okapia.osid.jamocha.spi.AbstractSourceableOsidObject
- All Implemented Interfaces:
Browsable, Extensible, Identifiable, OsidObject, Sourceable
- Direct Known Subclasses:
AbstractAsset, AbstractComposition, AbstractEntry, AbstractInstallationPackage, AbstractOsidCatalog, AbstractOsidGovernator, AbstractRecipe
public abstract class AbstractSourceableOsidObject
extends AbstractOsidObject
implements Sourceable, OsidObject
Defines a sourceable
OsidObject.
setProvider() should be used to set the provider
information by subclasses.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected classComposed Sourceable.Nested classes/interfaces inherited from class AbstractOsidObject
AbstractOsidObject.BrowsableModifier and TypeClassDescriptionprotected classComposed Browsable. -
Constructor Summary
ConstructorsConstructorDescriptionConstructs a newAbstractSourceableOsidObject. -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddAssetsToBranding(Collection<Asset> assets) Adds assets to the branding.protected voidaddAssetToBranding(Asset asset) Adds an asset to the branding.Gets a branding, such as an image or logo, expressed using theAssetinterface.Gets the branding asset Ids, such as an image or logo, expressed using theAssetinterface.Gets the terms of usage.Gets theResourcerepresenting the provider of this catalog.Gets theIdof theProviderof thisCatalog.protected voidsetBranding(Collection<Asset> assets) Sets the branding to the given assets.protected voidsetBranding(Asset asset) Sets the branding to the given asset.protected voidsetLicense(DisplayText license) Sets the license.protected voidsetProvider(Provider provider) Sets the provider for this catalog.protected voidsetProvider(Resource provider) Sets the provider.Methods inherited from class AbstractOsidObject
addProperties, addRecordType, getDescription, getDisplayName, getGenusType, getProperties, getPropertiesByRecordType, getRecordTypes, hasRecordType, isOfGenusType, setDescription, setDisplayName, setGenusTypeModifier and TypeMethodDescriptionprotected voidaddProperties(Collection<Property> set, Type recordType) Adds a property set.protected voidaddRecordType(Type recordType) Adds a record type.Gets the description associated with this instance of this OSID object.Gets the preferred display name associated with this instance of this OSID object appropriate for display to the user.Gets the genus type of this object.Gets a list of all properties of this object including those corresponding to data within this object's records.getPropertiesByRecordType(Type recordType) Gets the properties by record type.Gets the record types available in this object.booleanhasRecordType(Type recordType) Tests if this object supports the given recordType.booleanisOfGenusType(Type genusType) Tests if this object is of the given genusType.protected voidsetDescription(DisplayText description) Sets the description of this object.protected voidsetDisplayName(DisplayText displayName) Sets the displayName for this object.protected voidsetGenusType(Type genusType) Sets a genus type.Methods inherited from class AbstractIdentifiable
current, equals, getId, hashCode, isCurrent, setId, stale, toStringModifier and TypeMethodDescriptionprotected voidcurrent()Sets the current flag totrue.final booleanDetermines if the givenIdis equal to this one.getId()Gets theIdassociated with this instance of this OSID object.inthashCode()Returns a hash code value for thisOsidObjectbased on theId.booleanTests to see if the last method invoked retrieved up-to-date data.protected voidSets theIdassociated with this instance of this OSID object.protected voidstale()Sets the current flag tofalse.toString()Returns a string representation of this OsidObject.
-
Constructor Details
-
AbstractSourceableOsidObject
public AbstractSourceableOsidObject()Constructs a newAbstractSourceableOsidObject.
-
-
Method Details
-
getProviderId
Gets theIdof theProviderof thisCatalog.- Specified by:
getProviderIdin interfaceSourceable- Returns:
- the
Provider Id
-
getProvider
Gets theResourcerepresenting the provider of this catalog.- Specified by:
getProviderin interfaceSourceable- Returns:
- the provider
- Throws:
OperationFailedException- unable to complete request
-
setProvider
Sets the provider for this catalog.- Parameters:
provider- the new provider- Throws:
NullArgumentException-providerisnull
-
setProvider
Sets the provider.- Parameters:
provider- the new provider- Throws:
NullArgumentException-providerisnull
-
getBrandingIds
Gets the branding asset Ids, such as an image or logo, expressed using theAssetinterface.- Specified by:
getBrandingIdsin interfaceSourceable- Returns:
- a list of asset Ids
-
getBranding
Gets a branding, such as an image or logo, expressed using theAssetinterface.- Specified by:
getBrandingin interfaceSourceable- Returns:
- a list of assets
- Throws:
OperationFailedException- unable to complete request
-
addAssetToBranding
Adds an asset to the branding.- Parameters:
asset- an asset to add- Throws:
NullArgumentException-assetisnull
-
addAssetsToBranding
Adds assets to the branding.- Parameters:
assets- array of assets to add- Throws:
NullArgumentException-assetisnull
-
setBranding
Sets the branding to the given asset.- Parameters:
asset- an asset to set- Throws:
NullArgumentException-assetisnull
-
setBranding
Sets the branding to the given assets.- Parameters:
assets- an array of assets to setd- Throws:
NullArgumentException-assetsisnull
-
getLicense
Gets the terms of usage. An empty license means the terms are unknown.- Specified by:
getLicensein interfaceSourceable- Returns:
- the license
-
setLicense
Sets the license.- Parameters:
license- the license- Throws:
NullArgumentException-licenseisnull
-