work with object's attached files
There are many cases where you will want to associate
external files with an Oberon business object (for example, a Drawing
object can have attached CAD files). To make this association, you
must put the files into the object. This operation is called fileput.
Attaching a file to an Oberon object allows other users to access
this file that might not otherwise be accessible (for example when
the file is stored into a personal directory of your PC).
A single object may have files in various types; this depends on
the list of filetypes associated to the object's current lifecycle.
The filetype
specifies a kind of file (such as TEXT, OFFICE , CAD etc.) that
may be placed into an object. It defines the default extension for
the filename (.txt, .pdf, .xls etc.) and the mime-type which represent
the programs to launch for document editing, viewing, or printing.
Adding files to an object
The Oberon fileput feature
allows files of various formats to be managed by the object.
The file is logically placed into a filespace
depending on the object lifecycle's
rules and it is physically placed into the local file system or
into a remote file system associated to the filespace.
In particular, the final destination of the file's physical copy
is determined by Oberon according to the filespace protocol (http/ftp/file/database)
and its associated localareas.
When a filespace doesn't have associated localareas the file is
directly transferred to filespace's storage locations; on the other
hand, when the filespace is locally replicated, the file copy is
transferred to the user's default localarea if it is defined (or
to the filespace otherwise).
All the process is completely transparent for the user.
To add the files, a user should have the fileput privilege activated
in the current lifecycle
stage .
Users can add a files to an object by the "Domain Object Manipulation"
client. Simply search/select the object and push the "File
Put" button.

In the "File Put" form you can
choose one or more files from your local file system according to
the selected filetype's extension. You can also activate the overwrite
and the unlock checks; their meaning is:
- overwrite: when activated all file for the same filetype
will be removed before attach the new ones. Note: the fileput operation
has the effect of updating the object with the latest version of
the file; in other words, if a file with the same name for the selected
filetype is already attached to the object, the file content will
be updated with the new content.
- unlock: normally the file is marked as locked when attached
to the object, this prevents other users from editing the files
contents until the current user doesn't finish working with it.
Typically, the object holder will want to maintain editing control
over the file. For example, the user may be editing a CAD file and
the file is still undergoing changes. After the edit was completed,
the user would remove the lock (checking this option during the
fileput process).
- indexed: when a file is indexed, its content is extracted
inside the platform and saved into the database; this allows the
users to perform full text search inside object attachments and
to retrieve objects on the basis of these filters. [Requires the
Apache TIKA module]
An equivalent OOQL
command
might be:
| object fileput |
| |
'Horror'
'Saw II' '-''
or
'Horror' 'Saw II' '-' in 'Movies'
or
#00002-69EB8421 |
| client
filetype 'JPG' name 'C:/Temp/saw2.jpg' 'C:/Temp/saw2_alternative.jpg'
; |
The attached files will not change if
you edit your own personal copy: any edits that you make to that
file will not automatically appear in Oberon. The only way to have
those changes visible to other users is to either put the new version.
Getting/Removing object's
attached files
The lifecycle definition can also designate when specified users,
teams, and assignments have access to object's attached files. Once
a file is attached to an object, it can be downloaded by other users
who have the fileget access in the object's current lifecycle
stage .
If the file is not locked, another user who have the fileput access
can edit and update it inside Oberon, in this case you may want
to replace your original copy with the one from Oberon, or you may
want to edit the file externally.
When a business object file is retrieved, a copy is made and placed
in the folder specified into your local file system. This copy does
not affect the Oberon copy, still available to other users.
The file is not deleted from the filespace and remains under the
control of Oberon at all times, until you explicitly delete it.
Users can retrieve one or more files from an object by the "Domain
Object Manipulation" client. Simply search/select the object
and push the "File List" button.

In the "File List" form you
can see all object's attached files; the blue point on the left
and the yellow padlock icon indicate the default filetype and if
the file is currently locked respectively.
For each file is also reported the filespace and the localarea(s)
where a copy of it is physically stored; the brackets indicate where
is placed the most updated file version.
A file can be locked during the fileget so that no
one else can update the copy saved in Oberon while you are working
on it. When you complete the work on this file, you must put the
file back into Oberon in order to update the system with the new
version.
Selecting the interested file(s) form the "File List"
form, you can perform two kinds of operations:
- fileget: extract a copy of the files from Oberon into the
specified Path
| object fileget
|
| |
'Horror'
'Saw II' '-''
or
'Horror' 'Saw II' '-' in 'Movies'
or
#00002-69EB8421 |
| client
filetype 'JPG' name 'saw2.jpg' path 'C:/Temp/download';
|
Note: When a file is retrieved ["object fileget"
OOQL command] you can also specify
the "synchronize" flag:
- if the most updated file is stored inside the user default localarea,
only the filespace will be aligned with the same version if needed
- if the most updated file is stored in another localarea or in the
filespace, the file will be also copyed to the user localarea (and
in the fielspace if needed)
and the "force" flag:
- if you don't set this flag and the source localarea is not available
you will get an error and not will be able to retrieve the file. Otherwise,
the file will be retrieved from an alternative location (filespace
or localarea) according to a priority based on the update version
number; in this case the syncronize flag will be ignored.
- filedelete: remove the files
from Oberon
(this process doesn't remove physically the files from the Oberon
folders, but you will need an additional filespace
defrag
action to completely remove them)
| object filedelete
|
| |
'Horror'
'Saw II' '-''
or
'Horror' 'Saw II' '-' in 'Movies'
or
#00002-69EB8421 |
| filetype
'PNG' name 'saw2_blog.png'; |
Renaming the files
Users can also rename one or more attached files: simply searching/selecting
the object and pushing the "File Rename" button.

By the "File Rename" form you
can change the Original file name and you can also change the filetype.
The first change has only effect on the meta-data and on the physical
file name when the filespace or the localarea doesn't apply the
file hashing. On the other hand, the filetype change has effect
only on the hashed file names because they take the new filetype
extension.
| object filerename
|
| |
'Horror'
'Saw II' '-''
or
'Horror' 'Saw II' '-' in 'Movies'
or
#00002-69EB8421 |
| |
filetype
'JPG' name 'saw2.jpg' newtype 'PNG' newname 'saw2.png ; |
File synchronization
In the "File List" form you can also push the synchronize
button. This process executes a synchronization between the filespace
and all the localareas where the files are present; in other words
the most recent version (for each file) will be replicated for other
storage locations so that all of them will have the same updated
copies. The synchronization command will affect all object's attached
files.
| object synchronize |
| |
'Horror'
'Saw II' '-'' ;
or
'Horror' 'Saw II' '-' in 'Movies' ;
or
#00002-69EB8421 ; |
|