Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.infodesire.infobit
Interface InfobitManager

All Known Implementing Classes:
  InfobitDAO

public interface InfobitManager

manager for infobits. frontend for infobit DAO

Version:
  $Revision: 1.16 $
Author:
  konstantin

Method Summary
`Version` | `createBinary(Infobit ib, java.lang.String name, byte[] data, java.lang.String mime, java.util.Set keywords)` create binary infobit content
`Version` | `createBinary(Infobit ib, java.lang.String name, java.io.InputStream stream, java.lang.String mime, java.util.Set keywords)` create binary infobit content
`Infobit` | `createInfobit(java.lang.String name, Acl acl)` create new infobit instance with specified name and acl
`Version` | `createScript(Infobit ib, java.lang.String name, Infobit template, java.util.Map links, java.util.Set keywords)` create script.
`Version` | `createTemplate(Infobit ib, java.lang.String name, java.lang.String text)` create template for scripts.
`Version` | `createText(Infobit ib, java.lang.String name, java.lang.String text, java.util.Set keywords)` create new version with textual content.
`byte[]` | `getBytes(PrimitiveContent content)` Primitive content as byte array.
`java.io.InputStream` | `getContent(PrimitiveContent content)` stream with data of primitive content ( binary, text or whatever ).
`int` | `getContentLength(PrimitiveContent content)` Gets the size of the content.
`Infobit` | `getInfobit(java.lang.String id)` load infobit in with id.
`java.lang.String` | `getString(PrimitiveContent content)` primitive content as string.
`boolean` | `hasInfobit(java.lang.String id)` whether pool knows about infobit ( i.e.
`java.util.Collection` | `queryInfobits(java.lang.String where)` query infobits.
`void` | `removeInfobit(java.lang.String id)` remove infobit if possible
`void` | `setActualVersion(Infobit ib, Version version)` Sets the ActualVersion attribute of the InfobitManager object
`void` | `setAttribute(Content content, java.lang.String name, java.lang.String value)` set attribute value for given infobit content.
`void` | `setAttribute(Infobit infobit, java.lang.String name, java.lang.String value)` set attribute value for given infobit.

Method Detail

### createInfobit

    public Infobit createInfobit(java.lang.String name,
                                 Acl acl)
                          throws InfobitException,
                                 InfobitSecurityException

  create new infobit instance with specified name and acl

  Parameters:
    `name` - infobit name
    `acl` - acl name
  Returns:
    Description of the Returned Value
  Throws:
    `InfobitException` - thrown when infobit creation fails
    `InfobitSecurityException` - thrown because of insufficient privileges

### hasInfobit

    public boolean hasInfobit(java.lang.String id)
                       throws InfobitException

  whether pool knows about infobit ( i.e. infobit exists )

  Parameters:
    `id` - infobit id
  Returns:
    whether infobit with given name exists
  Throws:
    `InfobitException` - thrown when some problem occurs

### getInfobit

    public Infobit getInfobit(java.lang.String id)
                       throws InfobitException,
                              InfobitSecurityException

  load infobit in with id. if exists and possible

  Parameters:
    `id` - infobit id
  Returns:
    infobit instance
  Throws:
    `InfobitException` - when some problem occurs
    `InfobitSecurityException` - Description of Exception

### removeInfobit

    public void removeInfobit(java.lang.String id)
                       throws InfobitException,
                              InfobitIntegrityException,
                              InfobitSecurityException

  remove infobit if possible

  Parameters:
    `id` - infobit id
  Throws:
    `InfobitException` - when some problem occurs
    `InfobitSecurityException` - when insufficient permissions.
    `InfobitIntegrityException` - when removal violates structural integrity

### createText

    public Version createText(Infobit ib,
                              java.lang.String name,
                              java.lang.String text,
                              java.util.Set keywords)
                       throws InfobitException,
                              InfobitSecurityException

  create new version with textual content.

  Parameters:
    `ib` - infobit
    `name` - unique version name ( within given infobit )
    `keywords` - keywords for searching. shall contain strings
    `text` - textual content of infobit
  Returns:
    Description of the Returned Value
  Throws:
    `InfobitException` - when some problem occurs
    `InfobitSecurityException` - when insufficient permissions.

### createBinary

    public Version createBinary(Infobit ib,
                                java.lang.String name,
                                java.io.InputStream stream,
                                java.lang.String mime,
                                java.util.Set keywords)
                         throws InfobitException,
                                InfobitSecurityException

  create binary infobit content

  Parameters:
    `ib` - infobit
    `name` - unique version name ( within given infobit )
    `stream` - stream containing binary data
    `mime` - mime type
    `keywords` - keywords for searching . shall contain strings
  Returns:
    Description of the Returned Value
  Throws:
    `InfobitException` - when some problem occurs
    `InfobitSecurityException` - when insufficient permissions.

### createBinary

    public Version createBinary(Infobit ib,
                                java.lang.String name,
                                byte[] data,
                                java.lang.String mime,
                                java.util.Set keywords)
                         throws InfobitException,
                                InfobitSecurityException

  create binary infobit content

  Parameters:
    `ib` - infobit
    `name` - unique version name ( within given infobit )
    `data` - array coontaining binary data
    `mime` - mime type
    `keywords` - keywords for searching. shall contain strings
  Returns:
    Description of the Returned Value
  Throws:
    `InfobitException` - when some problem occurs
    `InfobitSecurityException` - when insufficient permissions.

### createTemplate

    public Version createTemplate(Infobit ib,
                                  java.lang.String name,
                                  java.lang.String text)
                           throws InfobitException,
                                  InfobitSecurityException

  create template for scripts. template does not have any keywords. it does not need them

  Parameters:
    `ib` - infobit
    `name` - unique version name ( within given infobit )
    `text` - template text
  Returns:
    Description of the Returned Value
  Throws:
    `InfobitException` - when some problem occurs
    `InfobitSecurityException` - when insufficient permissions.

### createScript

    public Version createScript(Infobit ib,
                                java.lang.String name,
                                Infobit template,
                                java.util.Map links,
                                java.util.Set keywords)
                         throws InfobitException,
                                InfobitSecurityException

  create script.

  Parameters:
    `ib` - infobit
    `name` - unique version name ( within given infobit )
    `template` - template infobit
    `links` - map of links to be merged with template. shall be keyed by strings and contain infobits
    `keywords` - keywords for searching. shall contain strings
  Returns:
    Description of the Returned Value
  Throws:
    `InfobitException` - Description of Exception
    `InfobitSecurityException` - Description of Exception

### setActualVersion

    public void setActualVersion(Infobit ib,
                                 Version version)
                          throws InfobitException,
                                 InfobitSecurityException

  Sets the ActualVersion attribute of the InfobitManager object

  Parameters:
    `ib` - The new ActualVersion value
    `version` - The new ActualVersion value
  Throws:
    `InfobitException` - Description of Exception
    `InfobitSecurityException` - Description of Exception

### getContent

    public java.io.InputStream getContent(PrimitiveContent content)
                                   throws InfobitException,
                                          InfobitSecurityException

  stream with data of primitive content ( binary, text or whatever ). resulting stream is coming out of blob, and shall be used ASAP and in any case inside the same transaction. Intendet use is to stream this content out to web client.

  Parameters:
    `content` - Description of Parameter
  Returns:
    The Content value
  Throws:
    `InfobitException` - Description of Exception
    `InfobitSecurityException` - Description of Exception

### getContentLength

    public int getContentLength(PrimitiveContent content)
                         throws InfobitException,
                                InfobitSecurityException

  Gets the size of the content.

  Parameters:
    `content` - The content the size of which to query
  Returns:
    The size of
  Throws:
    `InfobitException` - Description of Exception
    `InfobitSecurityException` - Description of Exception

### getBytes

    public byte[] getBytes(PrimitiveContent content)
                    throws InfobitException,
                           InfobitSecurityException

  Primitive content as byte array. Better not to use it for big stuff.

  Parameters:
    `content` - Description of Parameter
  Returns:
    The Bytes value
  Throws:
    `InfobitException` - Description of Exception
    `InfobitSecurityException` - Description of Exception

### getString

    public java.lang.String getString(PrimitiveContent content)
                               throws InfobitException,
                                      InfobitSecurityException

  primitive content as string. it's not said that this string will be making sense....

  Parameters:
    `content` - Description of Parameter
  Returns:
    The String value
  Throws:
    `InfobitException` - Description of Exception
    `InfobitSecurityException` - Description of Exception

### setAttribute

    public void setAttribute(Infobit infobit,
                             java.lang.String name,
                             java.lang.String value)
                      throws InfobitException,
                             InfobitSecurityException

  set attribute value for given infobit. set to null to remove attribute

  Parameters:
    `name` - The new Attribute value
    `value` - The new Attribute value
    `infobit` - The new Attribute value
  Throws:
    `InfobitException` - Description of Exception
    `InfobitSecurityException` - Description of Exception

### setAttribute

    public void setAttribute(Content content,
                             java.lang.String name,
                             java.lang.String value)
                      throws InfobitException,
                             InfobitSecurityException

  set attribute value for given infobit content. set value to null for removal

  Parameters:
    `name` - The new Attribute value
    `value` - The new Attribute value
    `content` - The new Attribute value
  Throws:
    `InfobitException` - Description of Exception
    `InfobitSecurityException` - Description of Exception

### queryInfobits

    public java.util.Collection queryInfobits(java.lang.String where)
                                       throws InfobitException,
                                              InfobitSecurityException

  query infobits. supply only where clause

  Parameters:
    `where` - Description of Parameter
  Returns:
    The InfobitByAttributes value
  Throws:
    `InfobitException` - Description of Exception
    `InfobitSecurityException` - Description of Exception

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2003 Information Desire GmbH. All Rights Reserved.