Interface Inx_Api_Resource_Resource

Description

An Inx_Api_Resource_Resource is a business object representing an attachment or an embedded image stored on the server.

An Inx_Api_Resource_Resource is a business object representing an attachment or an embedded image stored on the server. Resources can be used in mailings, depending on their sharing type. The following sharing types are supported:

  • SHARING_TYPE_SYSTEM: The resource can be used by all mailings in all lists
  • SHARING_TYPE_MAILING: The resource can only be used by one specific mailing
  • SHARING_TYPE_LIST: The resource can be used by all mailings of a specific list

Besides of the sharing type a Resource contains meta information about the represented resource:

  • The name: Each resource has a name. The name does not have to be unique.
  • The content type: Contains the MIME type of the resource.
  • The creation datetime: The datetime when the resource was uploaded.
  • The size: The size of the resource in bytes.
  • The user id: References the user who uploaded the resource.

To download a resource, use the Inx_Api_InputStream provided by getInputStream().

For an example on how to upload, retrieve and use resources, see the Inx_Api_Resource_ResourceManager documentation.

  • version: $Revision: 9497 $ $Date: 2007-12-19 17:03:25 +0200 (Tr, 19 Grd 2007) $ $Author: aurimas $
  • see: com.inxmail.xpro.api.resource.ResourceManager
  • since: API 1.0

Located in /Api/Resource/Resource.php (line 39)

Inx_Api_BusinessObject
   |
   --Inx_Api_Resource_Resource
Class Constant Summary
Method Summary
Methods
getContentType (line 184)

Returns the MIME type of the content.

Returns the MIME type of the content.

  • return: the MIME type of the content.
  • access: public
string getContentType ()
getCreationDatetime (line 131)

Returns the creation date of the resource.

Returns the creation date of the resource.

  • return: the creation date of the resource.
  • access: public
string getCreationDatetime ()
getInputStream (line 194)

Returns an Inx_Api_InputStream which can be used to download the resource file.

Returns an Inx_Api_InputStream which can be used to download the resource file.

  • return: an InputStream to download the resource file.
  • throws: Inx_Api_SecurityException if the session user doesn't have the following permission: Inx_Api_UserRights::RESOURCE_FEATURE_USE
  • access: public
Inx_Api_InputStream getInputStream ()
getListContextId (line 155)

Returns the id of the list this resource is bound to.

Returns the id of the list this resource is bound to. Only specified, if the sharing type is SHARING_TYPE_LIST.

  • return: the id of the list this resource is bound to.
  • access: public
int getListContextId ()
getMailingId (line 163)

Returns the id of the mailing this resource is bound to.

Returns the id of the mailing this resource is bound to. Only specified, if the sharing type is SHARING_TYPE_MAILING.

  • return: the id of the mailing this resource is bound to.
  • access: public
int getMailingId ()
getName (line 123)

Returns the filename of the resource.

Returns the filename of the resource.

  • return: the filename of the resource.
  • access: public
string getName ()
getSharingType (line 176)

Returns the sharing type.

Returns the sharing type. The following sharing type values are allowed:

  • SHARING_TYPE_MAILING: Resource is not shared, but bound to the specified mailing - getMailingId.
  • SHARING_TYPE_LIST: Resource is list shared, thus bound to the the specified list - getListContextId.
  • SHARING_TYPE_SYSTEM: Resource is system shared, thus not bound to a single mailing or list.

  • return: the sharing type.
  • access: public
int getSharingType ()
getSize (line 139)

Returns the size of the resource file in bytes.

Returns the size of the resource file in bytes.

  • return: the size of the resource file in bytes.
  • access: public
int getSize ()
getUserId (line 147)

Returns the id of the user who uploaded the resource.

Returns the id of the user who uploaded the resource.

  • return: the id of the user who uploaded the resource.
  • access: public
int getUserId ()

Inherited Methods

Inherited From Inx_Api_BusinessObject

Inx_Api_BusinessObject::commitUpdate()
Inx_Api_BusinessObject::getId()
Inx_Api_BusinessObject::reload()
Class Constants
ATTRIBUTE_CREATION_DATETIME = 2 (line 70)

Constant for the creation date attribute.

Constant for the creation date attribute. Used by the select() and selectAll() methods to order the result.

  • see: selectAll(int orderAttribute, int)
  • see: select(Mailing, int orderAttribute, int)
ATTRIBUTE_NAME = 0 (line 50)

Constant for the name attribute.

Constant for the name attribute. Used by the select() and selectAll() methods to order the result.

  • see: selectAll(int orderAttribute, int)
  • see: select(Mailing, int orderAttribute, int)
ATTRIBUTE_SHARING_TYPE = 4 (line 80)

Constant for the sharing type attribute.

Constant for the sharing type attribute. Used by the select() and selectAll() methods to order the result.

  • see: selectAll(int orderAttribute, int)
  • see: select(Mailing, int orderAttribute, int)
ATTRIBUTE_SIZE = 1 (line 60)

Constant for the size attribute.

Constant for the size attribute. Used by the select() and selectAll() methods to order the result.

  • see: selectAll(int orderAttribute, int)
  • see: select(Mailing, int orderAttribute, int)
ATTRIBUTE_USER_ID = 5 (line 90)

Constant for the user id attribute.

Constant for the user id attribute. Used by the select() and selectAll() methods to order the result.

  • see: selectAll(int orderAttribute, int)
  • see: select(Mailing, int orderAttribute, int)
SHARING_TYPE_LIST = 1 (line 107)

Sharing behaviour: Resource is list shared, thus bound to the the specified list - getListContextId().

Sharing behaviour: Resource is list shared, thus bound to the the specified list - getListContextId().

  • see: ::getSharingType()
SHARING_TYPE_MAILING = 0 (line 99)

Sharing behaviour: Resource is not shared, but bound to the specified mailing - getMailingId().

Sharing behaviour: Resource is not shared, but bound to the specified mailing - getMailingId().

  • see: ::getSharingType()
SHARING_TYPE_SYSTEM = 2 (line 115)

Sharing behaviour: Resource is system shared, thus not bound to a single mailing or list.

Sharing behaviour: Resource is system shared, thus not bound to a single mailing or list.

  • see: ::getSharingType()

Documentation generated on Thu, 17 Sep 2015 14:27:29 +0200 by phpDocumentor 1.3.2