Difference between revisions of "API:EPrints/DataObj/EPM"

From EPrints Documentation
Jump to: navigation, search
Line 1: Line 1:
 
<!-- Pod2Wiki=_preamble_  
 
<!-- Pod2Wiki=_preamble_  
This page has been automatically generated from the EPrints 3.2 source. Any wiki changes made between the 'Pod2Wiki=*' and 'Edit below this comment' comments will be lost.
+
This page has been automatically generated from the EPrints 3.4 source. Any wiki changes made between the 'Pod2Wiki=*' and 'Edit below this comment' comments will be lost.
  -->{{API}}{{Pod2Wiki}}{{API:Source|file=perl_lib/EPrints/DataObj/EPM.pm|package_name=EPrints::DataObj::EPM}}[[Category:API|EPM]][[Category:API:EPrints/DataObj|EPM]][[Category:API:EPrints/DataObj/EPM|EPM]]<div><!-- Edit below this comment -->
+
  -->{{API}}{{Pod2Wiki}}{{API:Source|file=EPrints/DataObj/EPM.pm|package_name=EPrints::DataObj::EPM}}[[Category:API|EPM]][[Category:API:EPrints/DataObj|EPM]]<div><!-- Edit below this comment -->
  
  
 
<!-- Pod2Wiki=_private_ --><!-- Pod2Wiki=head_name -->
 
<!-- Pod2Wiki=_private_ --><!-- Pod2Wiki=head_name -->
 
==NAME==
 
==NAME==
'''EPrints::DataObj::EPM''' - Class representing an EPrints Package
+
'''EPrints::DataObj::EPM''' - An EPrints Package Manager (EPM) package.
  
 +
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
 +
<span style='display:none'>User Comments</span>
 
<!-- Edit below this comment -->
 
<!-- Edit below this comment -->
  
  
 
<!-- Pod2Wiki= -->
 
<!-- Pod2Wiki= -->
 +
</div>
 
<!-- Pod2Wiki=head_description -->
 
<!-- Pod2Wiki=head_description -->
 
==DESCRIPTION==
 
==DESCRIPTION==
 +
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
 +
<span style='display:none'>User Comments</span>
 
<!-- Edit below this comment -->
 
<!-- Edit below this comment -->
  
  
 
<!-- Pod2Wiki= -->
 
<!-- Pod2Wiki= -->
<!-- Pod2Wiki=head_system_metadata -->
+
</div>
==SYSTEM METADATA==
+
<!-- Pod2Wiki=head_core_metadata_fields -->
 +
==CORE METADATA FIELDS==
 +
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
 +
<span style='display:none'>User Comments</span>
 
<!-- Edit below this comment -->
 
<!-- Edit below this comment -->
  
  
 
<!-- Pod2Wiki= -->
 
<!-- Pod2Wiki= -->
 +
</div>
 +
<!-- Pod2Wiki=item_epmid -->
 +
===epmid (id)===
 +
 +
The text ID of the EPM package
 +
 +
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
 +
<span style='display:none'>User Comments</span>
 +
<!-- Edit below this comment -->
 +
 +
 +
<!-- Pod2Wiki= -->
 +
</div>
 +
<!-- Pod2Wiki=item_eprintid -->
 +
===eprintid (int)===
 +
 +
The ID number of the EPrint record from the EPM repository.
 +
 +
E.g. http://bazaar.eprints.org/.
 +
 +
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
 +
<span style='display:none'>User Comments</span>
 +
<!-- Edit below this comment -->
 +
 +
 +
<!-- Pod2Wiki= -->
 +
</div>
 +
<!-- Pod2Wiki=item_uri -->
 +
===uri (url)===
 +
 +
The URI of the EPM package from the EPM repository it is hosted.
 +
 +
E.g. http://bazaar.eprints.org/id/epm/reports
 +
 +
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
 +
<span style='display:none'>User Comments</span>
 +
<!-- Edit below this comment -->
 +
 +
 +
<!-- Pod2Wiki= -->
 +
</div>
 +
<!-- Pod2Wiki=item_version -->
 +
===version (text)===
 +
 +
The version (e.g. 1.0.0) of the EPM package.
 +
 +
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
 +
<span style='display:none'>User Comments</span>
 +
<!-- Edit below this comment -->
 +
 +
 +
<!-- Pod2Wiki= -->
 +
</div>
 +
<!-- Pod2Wiki=item_controller -->
 +
===controller (text)===
 +
 +
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
 +
<span style='display:none'>User Comments</span>
 +
<!-- Edit below this comment -->
 +
 +
 +
<!-- Pod2Wiki= -->
 +
</div>
 +
<!-- Pod2Wiki=item_creators -->
 +
===creators (compound, multiple)===
 +
 +
Creators of the EPM package including both their full name and email  address.
 +
 +
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
 +
<span style='display:none'>User Comments</span>
 +
<!-- Edit below this comment -->
 +
 +
 +
<!-- Pod2Wiki= -->
 +
</div>
 +
<!-- Pod2Wiki=item_datestamp -->
 +
===datestamp (time)===
 +
 +
The date and time this version of this EPM package was published.
 +
 +
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
 +
<span style='display:none'>User Comments</span>
 +
<!-- Edit below this comment -->
 +
 +
 +
<!-- Pod2Wiki= -->
 +
</div>
 +
<!-- Pod2Wiki=item_title -->
 +
===title (longtext)===
 +
 +
The title of this EPM package.
 +
 +
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
 +
<span style='display:none'>User Comments</span>
 +
<!-- Edit below this comment -->
 +
 +
 +
<!-- Pod2Wiki= -->
 +
</div>
 +
<!-- Pod2Wiki=item_description -->
 +
===description (longtext)===
 +
 +
The description of this EPM package and its purpose.
 +
 +
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
 +
<span style='display:none'>User Comments</span>
 +
<!-- Edit below this comment -->
 +
 +
 +
<!-- Pod2Wiki= -->
 +
</div>
 +
<!-- Pod2Wiki=item_requirements -->
 +
===requirements (longtext)===
 +
 +
A description of the requirements for this EPM package.
 +
 +
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
 +
<span style='display:none'>User Comments</span>
 +
<!-- Edit below this comment -->
 +
 +
 +
<!-- Pod2Wiki= -->
 +
</div>
 +
<!-- Pod2Wiki=item_home_page -->
 +
===home_page (url)===
 +
 +
A URL for the home page of the EPM package. Maybe a page including  documentation on how to use the EPM package.
 +
 +
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
 +
<span style='display:none'>User Comments</span>
 +
<!-- Edit below this comment -->
 +
 +
 +
<!-- Pod2Wiki= -->
 +
</div>
 +
<!-- Pod2Wiki=item_icon -->
 +
===icon (url)===
 +
 +
A URL for the icon for the EPM package.
 +
 +
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
 +
<span style='display:none'>User Comments</span>
 +
<!-- Edit below this comment -->
 +
 +
 +
<!-- Pod2Wiki= -->
 +
</div>
 +
<!-- Pod2Wiki=head_references_and_related_objects -->
 +
==REFERENCES AND RELATED OBJECTS==
 +
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
 +
<span style='display:none'>User Comments</span>
 +
<!-- Edit below this comment -->
 +
 +
 +
<!-- Pod2Wiki= -->
 +
</div>
 +
<!-- Pod2Wiki=item_documents -->
 +
===documents (subobject, multiple)===
 +
 +
The documents for this EPM package. Effectively a manifest of files required to install the EPM om a repository.
 +
 +
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
 +
<span style='display:none'>User Comments</span>
 +
<!-- Edit below this comment -->
 +
 +
 +
<!-- Pod2Wiki= -->
 +
</div>
 +
<!-- Pod2Wiki=head_instance_variables -->
 +
==INSTANCE VARIABLES==
 +
See [[API:EPrints/DataObj#INSTANCE_VARIABLES|EPrints::DataObj]].
 +
 +
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
 +
<span style='display:none'>User Comments</span>
 +
<!-- Edit below this comment -->
 +
 +
 +
<!-- Pod2Wiki= -->
 +
</div>
 
<!-- Pod2Wiki=head_methods -->
 
<!-- Pod2Wiki=head_methods -->
 
==METHODS==
 
==METHODS==
<!-- Pod2Wiki=head_get_system_field_info -->
+
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
===get_system_field_info===
+
<span style='display:none'>User Comments</span>
 +
<!-- Edit below this comment -->
 +
 
 +
 
 +
<!-- Pod2Wiki= -->
 +
</div>
 +
<!-- Pod2Wiki=head_constructor_methods -->
 +
===Constructor Methods===
 +
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
 +
<span style='display:none'>User Comments</span>
 +
<!-- Edit below this comment -->
 +
 
 +
 
 +
<!-- Pod2Wiki= -->
 +
</div>
 +
<!-- Pod2Wiki=item_new -->
 +
====new====
 +
 
 +
$epm = EPrints::DataObj::EPM-&gt;new( $repo, $id )
 +
Returns a new object representing the installed EPM package <tt>$id</tt>.
 +
 
 +
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
 +
<span style='display:none'>User Comments</span>
 +
<!-- Edit below this comment -->
 +
 
 +
 
 +
<!-- Pod2Wiki= -->
 +
</div>
 +
<!-- Pod2Wiki=item_new_from_data -->
 +
====new_from_data====
 +
 
 +
$epm = EPrints::DataObj::EPM-&gt;new_from_data( $repo, $epdata, $dataset )
 +
Returns a new object representing the EPM package based on the  <tt>$epdata</tt> and <tt>$dataset</tt>.
 +
 
 +
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
 +
<span style='display:none'>User Comments</span>
 +
<!-- Edit below this comment -->
  
<source lang="perl">$metadata = EPrints::DataObj::EPM->get_system_field_info
 
  
</source>
+
<!-- Pod2Wiki= -->
Return an array describing the system metadata of the EPrint dataset.
+
</div>
 +
<!-- Pod2Wiki=item_new_from_data -->
 +
====new_from_data====
  
 +
$epm = EPrints::DataObj::EPM-&gt;new_from_data( $repo, $xml )
 +
Returns a new object representing the EPM package based on the  <tt>$xml</tt> provided.
 +
 +
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
 +
<span style='display:none'>User Comments</span>
 
<!-- Edit below this comment -->
 
<!-- Edit below this comment -->
  
  
 
<!-- Pod2Wiki= -->
 
<!-- Pod2Wiki= -->
<!-- Pod2Wiki=head_map -->
+
</div>
===map===
+
<!-- Pod2Wiki=item_new_from_data -->
 +
====new_from_data====
  
<source lang="perl">EPrints::DataObj::EPM->map( $repo, sub { ... }, $ctx )
+
$epm = EPrints::DataObj::EPM-&gt;new_from_data( $repo, $fh )
 +
Returns a new object representing the EPM package based on the XML  from the file handle <tt>$fh</tt> provided.
  
</source>
+
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
Apply a function over all installed EPMs.
+
<span style='display:none'>User Comments</span>
 +
<!-- Edit below this comment -->
  
<pre>  sub {
 
    my( $repo, $dataset, $epm [, $ctx ] ) = @_;
 
  }</pre>
 
  
This loads the EPM index files only.
+
<!-- Pod2Wiki= -->
 +
</div>
 +
<!-- Pod2Wiki=item_new_from_manifest -->
 +
====new_from_manifest====
 +
 
 +
$epm = EPrint::DataObj::EPM-&gt;new_from_manifest( $repo, $epdata, [ @manifest ] )
 +
Makes and returns a new EPM object based on the <tt>$epdata</tt> and a  manifest of installable files.
 +
 
 +
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
 +
<span style='display:none'>User Comments</span>
 +
<!-- Edit below this comment -->
 +
 
  
 +
<!-- Pod2Wiki= -->
 +
</div>
 +
<!-- Pod2Wiki=head_class_methods -->
 +
===Class Methods===
 +
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
 +
<span style='display:none'>User Comments</span>
 
<!-- Edit below this comment -->
 
<!-- Edit below this comment -->
  
  
 
<!-- Pod2Wiki= -->
 
<!-- Pod2Wiki= -->
<!-- Pod2Wiki=head_new -->
+
</div>
===new===
+
<!-- Pod2Wiki=item_get_system_field_info -->
 +
====get_system_field_info====
 +
 
 +
$metadata = EPrints::DataObj::EPM-&gt;get_system_field_info
 +
Returns an array describing the system metadata of the epm dataset.
 +
 
 +
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
 +
<span style='display:none'>User Comments</span>
 +
<!-- Edit below this comment -->
  
<source lang="perl">$epm = EPrints::DataObj::EPM->new( $repo, $id )
 
  
</source>
+
<!-- Pod2Wiki= -->
Returns a new object representing the installed package $id.
+
</div>
 +
<!-- Pod2Wiki=item_get_dataset_id -->
 +
====get_dataset_id====
  
 +
$dataset = EPrints::DataObj::EPM-&gt;get_dataset_id
 +
Returns the ID of the [[API:EPrints/DataSet|EPrints::DataSet]] object to which this record belongs.
 +
 +
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
 +
<span style='display:none'>User Comments</span>
 
<!-- Edit below this comment -->
 
<!-- Edit below this comment -->
  
  
 
<!-- Pod2Wiki= -->
 
<!-- Pod2Wiki= -->
<!-- Pod2Wiki=head_new_from_manifest -->
+
</div>
===new_from_manifest===
+
<!-- Pod2Wiki=item_render_controller -->
 +
====render_controller====
  
<source lang="perl">$epm = EPrint::DataObj::EPM->new_from_manifest( $repo, $epdata [, @manifest ] )
+
$xhtml = EPrints::DataObj::EPM::render_controller( $repo, $field, $value, under, undef, $epm )
 +
Returns and XHTML DOM object rendering for the action link of the EPM using the screen plugin with name supplied by <tt>$value</tt>.
  
</source>
+
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
Makes and returns a new EPM object based on a manifest of installable files.
+
<span style='display:none'>User Comments</span>
 +
<!-- Edit below this comment -->
  
 +
 +
<!-- Pod2Wiki= -->
 +
</div>
 +
<!-- Pod2Wiki=item_render_icom -->
 +
====render_icom====
 +
 +
$xhtml = EPrints::DataObj::EPM::render_icom( $repo, $field, $value, under, undef, $epm )
 +
Returns and XHTML DOM object rendering for the icon of the EPM using  the image with the filename supplied by <tt>$value</tt>.
 +
 +
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
 +
<span style='display:none'>User Comments</span>
 
<!-- Edit below this comment -->
 
<!-- Edit below this comment -->
  
  
 
<!-- Pod2Wiki= -->
 
<!-- Pod2Wiki= -->
<!-- Pod2Wiki=head_commit -->
+
</div>
===commit===
+
<!-- Pod2Wiki=item_map -->
 +
====map====
 +
 
 +
EPrints::DataObj::EPM-&gt;map( $repo, $f, $ctx )
 +
Apply a function <tt>$f</tt> over all installed EPMs with and only context <tt>$ctx</tt>, which is not currently implemented.
  
<source lang="perl">$epm->commit
+
  sub {
 +
    my( $repo, $dataset, $epm, [ $ctx ] ) = @_;
 +
  }
 +
 
 +
This loads the EPM index files only.
  
</source>
+
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
 +
<span style='display:none'>User Comments</span>
 +
<!-- Edit below this comment -->
 +
 
 +
 
 +
<!-- Pod2Wiki= -->
 +
</div>
 +
<!-- Pod2Wiki=head_object_methods -->
 +
===Object Methods===
 +
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
 +
<span style='display:none'>User Comments</span>
 +
<!-- Edit below this comment -->
 +
 
 +
 
 +
<!-- Pod2Wiki= -->
 +
</div>
 +
<!-- Pod2Wiki=item_commit -->
 +
====commit====
 +
 
 +
$epm-&gt;commit
 
Commit any changes to the installed .epm, .epmi files.
 
Commit any changes to the installed .epm, .epmi files.
  
 +
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
 +
<span style='display:none'>User Comments</span>
 
<!-- Edit below this comment -->
 
<!-- Edit below this comment -->
  
  
 
<!-- Pod2Wiki= -->
 
<!-- Pod2Wiki= -->
<!-- Pod2Wiki=head_rebuild -->
+
</div>
===rebuild===
+
<!-- Pod2Wiki=item_rebuild -->
 +
====rebuild====
  
<source lang="perl">$epm->rebuild
+
$epm-&gt;rebuild
 
 
</source>
 
 
Reload all of the installed files (regenerating hashes if necessary).
 
Reload all of the installed files (regenerating hashes if necessary).
  
 +
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
 +
<span style='display:none'>User Comments</span>
 
<!-- Edit below this comment -->
 
<!-- Edit below this comment -->
  
  
 
<!-- Pod2Wiki= -->
 
<!-- Pod2Wiki= -->
<!-- Pod2Wiki=head_version -->
+
</div>
===version===
+
<!-- Pod2Wiki=item_version -->
 
+
====version====
<source lang="perl">$v = $epm->version
 
  
</source>
+
$v = $epm-&gt;version
 
Returns a stringified version suitable for string gt/lt matching.
 
Returns a stringified version suitable for string gt/lt matching.
  
 +
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
 +
<span style='display:none'>User Comments</span>
 
<!-- Edit below this comment -->
 
<!-- Edit below this comment -->
  
  
 
<!-- Pod2Wiki= -->
 
<!-- Pod2Wiki= -->
<!-- Pod2Wiki=head_is_enabled -->
+
</div>
===is_enabled===
+
<!-- Pod2Wiki=item_is_enabled -->
 +
====is_enabled====
 +
 
 +
$bool = $epm-&gt;is_enabled
 +
Returns <tt>true</tt> if the EPM is enabled for the current repository.
  
<source lang="perl">$bool = $epm->is_enabled
+
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
 +
<span style='display:none'>User Comments</span>
 +
<!-- Edit below this comment -->
  
</source>
 
Returns true if the $epm is enabled for the current repository.
 
  
 +
<!-- Pod2Wiki= -->
 +
</div>
 +
<!-- Pod2Wiki=item_repositories -->
 +
====repositories====
 +
 +
@repoids = $epm-&gt;repositories
 +
Returns a list of repository IDs in which this EPM is enabled.
 +
 +
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
 +
<span style='display:none'>User Comments</span>
 
<!-- Edit below this comment -->
 
<!-- Edit below this comment -->
  
  
 
<!-- Pod2Wiki= -->
 
<!-- Pod2Wiki= -->
<!-- Pod2Wiki=head_repositories -->
+
</div>
===repositories===
+
<!-- Pod2Wiki=item_package_filename -->
 +
====package_filename====
 +
 
 +
$filename = $epm-&gt;package_filename
 +
Returns the complete package filename.
 +
 
 +
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
 +
<span style='display:none'>User Comments</span>
 +
<!-- Edit below this comment -->
 +
 
  
<source lang="perl">@repoids = $epm->repositories
+
<!-- Pod2Wiki= -->
 +
</div>
 +
<!-- Pod2Wiki=item_epm_dir -->
 +
====epm_dir====
  
</source>
+
$dir = $epm-&gt;epm_dir
Returns a list of repository ids this $epm is enabled in.
+
Path to the epm directory for this EPM.
  
 +
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
 +
<span style='display:none'>User Comments</span>
 
<!-- Edit below this comment -->
 
<!-- Edit below this comment -->
  
  
 
<!-- Pod2Wiki= -->
 
<!-- Pod2Wiki= -->
<!-- Pod2Wiki=head_package_filename -->
+
</div>
===package_filename===
+
<!-- Pod2Wiki=item_installed_files -->
 +
====installed_files====
 +
 
 +
@files = $epm-&gt;installed_files
 +
Returns a list of installed files as [[API:EPrints/DataObj/File|EPrints::DataObj::File]].
 +
 
 +
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
 +
<span style='display:none'>User Comments</span>
 +
<!-- Edit below this comment -->
 +
 
  
<source lang="perl">$filename = $epm->package_filename()
+
<!-- Pod2Wiki= -->
 +
</div>
 +
<!-- Pod2Wiki=item_repository_files -->
 +
====repository_files====
  
</source>
+
@files = $epm-&gt;repository_files
Returns the complete package filename.
+
Returns the list of configuration files used to enable/configure this EPM.
  
 +
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
 +
<span style='display:none'>User Comments</span>
 
<!-- Edit below this comment -->
 
<!-- Edit below this comment -->
  
  
 
<!-- Pod2Wiki= -->
 
<!-- Pod2Wiki= -->
<!-- Pod2Wiki=head_epm_dir -->
+
</div>
===epm_dir===
+
<!-- Pod2Wiki=item_control_screen -->
 +
====control_screen====
  
<source lang="perl">$dir = $epm->epm_dir
+
$screen = $epm-&gt;control_screen( %params )
 +
Returns the control screen for this EPM. <tt>%params</tt> are passed to the  plugin constructor.
  
</source>
+
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
Path to the epm directory for this $epm.
+
<span style='display:none'>User Comments</span>
 +
<!-- Edit below this comment -->
  
 +
 +
<!-- Pod2Wiki= -->
 +
</div>
 +
<!-- Pod2Wiki=item_serialise -->
 +
====serialise====
 +
 +
$epm-&gt;serialise( $fh, [ $files ] )
 +
Serialises this EPM to the open file handle <tt>$fh</tt>. If <tt>$files</tt> is  true file contents are included.
 +
 +
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
 +
<span style='display:none'>User Comments</span>
 
<!-- Edit below this comment -->
 
<!-- Edit below this comment -->
  
  
 
<!-- Pod2Wiki= -->
 
<!-- Pod2Wiki= -->
<!-- Pod2Wiki=head_installed_files -->
+
</div>
===installed_files===
+
<!-- Pod2Wiki=item_url_stem -->
 +
====url_stem====
 +
 
 +
$url_stem = $epm-&gt;url_stem
 +
Returns the URL stem for this EPM. Always just an empty string.
 +
 
 +
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
 +
<span style='display:none'>User Comments</span>
 +
<!-- Edit below this comment -->
  
<source lang="perl">@files = $epm->installed_files()
 
  
</source>
+
<!-- Pod2Wiki= -->
Returns a list of installed files as [[API:EPrints/DataObj/File|EPrints::DataObj::File]].
+
</div>
 +
<!-- Pod2Wiki=item_html_phrase -->
 +
====html_phrase====
 +
 
 +
$xhtml_phrase = $epm-&gt;html_phrase( $phraseid, [ @pins ] )
 +
Returns and XHTML DOM oject of the HTML phrase for and EPM with the <tt>$phraseid</tt> using the <tt>@pins</tt> provided if required.
  
 +
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
 +
<span style='display:none'>User Comments</span>
 
<!-- Edit below this comment -->
 
<!-- Edit below this comment -->
  
  
 
<!-- Pod2Wiki= -->
 
<!-- Pod2Wiki= -->
<!-- Pod2Wiki=head_repository_files -->
+
</div>
===repository_files===
+
<!-- Pod2Wiki=item_install -->
 +
====install====
 +
 
 +
$ok = $epm-&gt;install( $handler, [ $force ] )
 +
Install the EPM into the system. <tt>$handler</tt> is a  [[API:EPrints/CLIProcessor|EPrints::CLIProcessor]] or [[API:EPrints/ScreenProcessor|EPrints::ScreenProcessor]], used for  reporting errors. 
  
<source lang="perl">@files = $epm->repository_files()
+
<tt>$force</tt> ignores checking the hashes of the files to make sure they  have not been changed.
  
</source>
+
Returns boolean dependent on whether install was successful.
Returns the list of configuration files used to enable/configure an $epm.
 
  
 +
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
 +
<span style='display:none'>User Comments</span>
 
<!-- Edit below this comment -->
 
<!-- Edit below this comment -->
  
  
 
<!-- Pod2Wiki= -->
 
<!-- Pod2Wiki= -->
<!-- Pod2Wiki=head_control_screen -->
+
</div>
===control_screen===
+
<!-- Pod2Wiki=item_uninstall -->
 +
====uninstall====
 +
 
 +
$ok = $epm-&gt;uninstall( $handler, [ $force ] )
 +
Remove the EPM from the system. <tt>$handler</tt> is a  [[API:EPrints/CLIProcessor|EPrints::CLIProcessor]] or [[API:EPrints/ScreenProcessor|EPrints::ScreenProcessor]], used for  reporting errors.
  
<source lang="perl">$screen = $epm->control_screen( %params )
+
<tt>$force</tt> ignores checking the hashes of the files to make sure they have not been changed.
  
</source>
+
Returns boolean dependent on whether uninstall was successful.
Returns the control screen for this $epm. %params are passed to the plugin constructor.
 
  
 +
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
 +
<span style='display:none'>User Comments</span>
 
<!-- Edit below this comment -->
 
<!-- Edit below this comment -->
  
  
 
<!-- Pod2Wiki= -->
 
<!-- Pod2Wiki= -->
<!-- Pod2Wiki=head_serialise -->
+
</div>
===serialise===
+
<!-- Pod2Wiki=item_disable_unchanged -->
 +
====disable_unchanged====
  
<source lang="perl">$epm->serialise( $fh, [ FILES ] )
+
$ok = $epm-&gt;disable_unchanged
 +
Remove unchanged files from the repository directory. This allows a  new version of the EPM to be installed/enabled.
  
</source>
+
Returns boolean dependent on whether disabling unchanged was  successful.
Serialises this EPM to the open file handle $fh. If FILES is true file contents are included.
 
  
 +
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
 +
<span style='display:none'>User Comments</span>
 
<!-- Edit below this comment -->
 
<!-- Edit below this comment -->
  
  
 
<!-- Pod2Wiki= -->
 
<!-- Pod2Wiki= -->
<!-- Pod2Wiki=head_install -->
+
</div>
===install===
+
<!-- Pod2Wiki=item_enable -->
 +
====enable====
  
<source lang="perl">$ok = $epm->install( HANDLER [, FORCE ] )
+
$ok = $epm-&gt;enable( $handler )
 +
Enables the EPM for the current repository using <tt>$handler</tt> to manage messaging for the enabling process.
  
</source>
+
Returns boolean dependent on whether enabling was successful.
Install the EPM into the system. HANDLER is a [[API:EPrints/CLIProcessor|EPrints::CLIProcessor]] or [[API:EPrints/ScreenProcessor|EPrints::ScreenProcessor]], used for reporting errors.
 
  
 +
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
 +
<span style='display:none'>User Comments</span>
 
<!-- Edit below this comment -->
 
<!-- Edit below this comment -->
  
  
 
<!-- Pod2Wiki= -->
 
<!-- Pod2Wiki= -->
<!-- Pod2Wiki=head_uninstall -->
+
</div>
===uninstall===
+
<!-- Pod2Wiki=item_enable -->
 +
====enable====
  
<source lang="perl">$ok = $epm->uninstall( HANDLER [, FORCE ] )
+
$ok = $epm-&gt;enable( $handler )
 +
Enables the EPM for the current repository using <tt>$handler</tt> to manage messaging for the disabling process.
  
</source>
+
Returns boolean dependent on whether disabling was successful.
Remove the EPM from the system. HANDLER is a [[API:EPrints/CLIProcessor|EPrints::CLIProcessor]] or [[API:EPrints/ScreenProcessor|EPrints::ScreenProcessor]], used for reporting errors.
 
  
 +
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
 +
<span style='display:none'>User Comments</span>
 
<!-- Edit below this comment -->
 
<!-- Edit below this comment -->
  
  
 
<!-- Pod2Wiki= -->
 
<!-- Pod2Wiki= -->
<!-- Pod2Wiki=head_disable_unchanged -->
+
</div>
===disable_unchanged===
+
<!-- Pod2Wiki=item_current_counters -->
 +
====current_counters====
  
<source lang="perl">$ok = $epm->disable_unchanged()
+
$conf = $epm-&gt;current_counters
 +
Get SQL counters for current data objects.
  
</source>
+
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
Remove unchanged files from the repository directory. This allows a new version of the EPM to be installed/enabled.
+
<span style='display:none'>User Comments</span>
 +
<!-- Edit below this comment -->
  
 +
 +
<!-- Pod2Wiki= -->
 +
</div>
 +
<!-- Pod2Wiki=item_current_datasets -->
 +
====current_datasets====
 +
 +
$conf = $epm-&gt;current_datasets
 +
Get dataset for current data objects.
 +
 +
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
 +
<span style='display:none'>User Comments</span>
 
<!-- Edit below this comment -->
 
<!-- Edit below this comment -->
  
  
 
<!-- Pod2Wiki= -->
 
<!-- Pod2Wiki= -->
<!-- Pod2Wiki=head_enable -->
+
</div>
===enable===
+
<!-- Pod2Wiki=item_update_counters -->
 +
====update_counters====
 +
 
 +
$ok = $epm-&gt;update_counters( $before )
 +
Update the SQL counters. Removing any counters listed in <tt>$before</tt>  that are not used any more. (<tt>$before</tt> should be retrieved before  enabling by using [[API:EPrints/DataObj/EPM#current_counters|current_counters]].)
 +
 
 +
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
 +
<span style='display:none'>User Comments</span>
 +
<!-- Edit below this comment -->
  
<source lang="perl">$ok = $epm->enable( $handler )
 
  
</source>
+
<!-- Pod2Wiki= -->
Enables the $epm for the current repository.
+
</div>
 +
<!-- Pod2Wiki=item_update_datasets -->
 +
====update_datasets====
  
 +
$ok = $epm-&gt;update_datasets( $before )
 +
Update the datasets following any configuration changes made by the  extension on being enabled. Removing any datasets listed in <tt>$before</tt> that are not used any more. <tt>$before</tt> should be retrieved before  enabling by using [[API:EPrints/DataObj/EPM#current_datasets|current_datasets]].
 +
 +
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
 +
<span style='display:none'>User Comments</span>
 
<!-- Edit below this comment -->
 
<!-- Edit below this comment -->
  
  
 
<!-- Pod2Wiki= -->
 
<!-- Pod2Wiki= -->
<!-- Pod2Wiki=head_utility_methods -->
+
</div>
===Utility Methods===
+
<!-- Pod2Wiki=item_publish -->
$conf = $epm-&gt;current_counters()
+
====publish====
$conf = $epm-&gt;current_datasets()
 
$ok = $epm-&gt;update_counters( $conf )
 
$ok = $epm-&gt;update_datasets( $conf )
 
Update the datasets following any configuration changes made by the extension on being enabled. $conf should be retrieved before enabling by using [[API:EPrints/DataObj/EPM#current_datasets|current_datasets]].
 
  
  $ok = $epm-&gt;publish( $handler, $base_url, %opts )
+
  $ok = $epm-&gt;publish( $handler, $url, %opts )
Publish this EPM to a remote system using SWORD.
+
Publish this EPM to a remote system using SWORD, using <tt>$handler</tt> to  manage messaging for the publishing process.
  
$base_url is the URL of the SWORD endpoint or a page containing a SWORD &lt;link&gt;.
+
<tt>$url</tt> is the URL of the SWORD endpoint or a page containing a SWORD link.
  
 
Options:
 
Options:
  
<pre> username - username for Basic auth
+
  username - username for Basic auth
  password - password for Basic auth</pre>
+
password - password for Basic auth
 +
 
 +
Returns a boolean dependent on whether the publishing was successful.
  
  $epm-&gt;add_to_xml( $dest, $src )
+
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '>
Add this package's XML $src to $dest XML. Useful for workflows and citations.
+
<span style='display:none'>User Comments</span>
 +
<!-- Edit below this comment -->
  
$src may have these additional attributes on elements:
 
  
* operation = "replace" | "disable" | *"merge"
+
<!-- Pod2Wiki= -->
: Where replace will replace the default element, disable will disable it and merge will merge the new branch with the old.
+
</div>
 +
<!-- Pod2Wiki=item_is_set -->
 +
====is_set====
  
  $epm-&gt;remove_from_xml( $dest )
+
  $ok = $epm-&gt;is_set( $fieldid )
Remove this package's extensions from $dest XML.
+
Returns a boolean dependent on whether a value is set for the field  with <tt>$fieldid</tt> for this EPM.
  
 +
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
 +
<span style='display:none'>User Comments</span>
 
<!-- Edit below this comment -->
 
<!-- Edit below this comment -->
  
  
 
<!-- Pod2Wiki= -->
 
<!-- Pod2Wiki= -->
<!-- Pod2Wiki=head_copyright -->
+
</div>
==COPYRIGHT==
+
<!-- Pod2Wiki=head_utility_methods -->
Copyright 2000-2011 University of Southampton.
+
===Utility Methods===
 +
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
 +
<span style='display:none'>User Comments</span>
 +
<!-- Edit below this comment -->
 +
 
 +
 
 +
<!-- Pod2Wiki= -->
 +
</div>
 +
<!-- Pod2Wiki=item_render_controller -->
 +
====render_controller====
 +
 
 +
$xhtml = EPrints::DataObj::EPM::render_controller( $repo, $field, $value, under, undef, $epm )
 +
Returns and XHTML DOM object rendering for the action link of the EPM using the screen plugin with name supplied by <tt>$value</tt>.
 +
 
 +
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
 +
<span style='display:none'>User Comments</span>
 +
<!-- Edit below this comment -->
 +
 
 +
 
 +
<!-- Pod2Wiki= -->
 +
</div>
 +
<!-- Pod2Wiki=item_render_icom -->
 +
====render_icom====
  
This file is part of EPrints http://www.eprints.org/.
+
$xhtml = EPrints::DataObj::EPM::render_icom( $repo, $field, $value, under, undef, $epm )
 +
Returns and XHTML DOM object rendering for the icon of the EPM using the image with the filename supplied by <tt>$value</tt>.
  
EPrints is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
+
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
 +
<span style='display:none'>User Comments</span>
 +
<!-- Edit below this comment -->
  
EPrints is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more details.
 
  
You should have received a copy of the GNU Lesser General Public License along with EPrints.  If not, see http://www.gnu.org/licenses/.
+
<!-- Pod2Wiki= -->
 +
</div>
 +
<!-- Pod2Wiki=head_see_also -->
 +
==SEE ALSO==
 +
[[API:EPrints/DataObj|EPrints::DataObj]] and [[API:EPrints/DataSet|EPrints::DataSet]]
  
 +
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
 +
<span style='display:none'>User Comments</span>
 
<!-- Edit below this comment -->
 
<!-- Edit below this comment -->
  
  
 
<!-- Pod2Wiki= -->
 
<!-- Pod2Wiki= -->
<!-- Pod2Wiki=_postamble_ -->
+
</div>
 +
<!-- Pod2Wiki=head_copyright -->
 +
==COPYRIGHT==
 +
{{API:Copyright}}
 +
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
 +
<span style='display:none'>User Comments</span>
 
<!-- Edit below this comment -->
 
<!-- Edit below this comment -->
 +
 +
 +
<!-- Pod2Wiki= -->
 +
</div>
 +
<!-- Pod2Wiki=_postamble_ --><!-- Edit below this comment -->

Revision as of 01:39, 11 January 2022

EPrints 3 Reference: Directory Structure - Metadata Fields - Repository Configuration - XML Config Files - XML Export Format - EPrints data structure - Core API - Data Objects


API: Core API

Latest Source Code (3.4, 3.3) | Revision Log | Before editing this page please read Pod2Wiki


NAME

EPrints::DataObj::EPM - An EPrints Package Manager (EPM) package.

User Comments


DESCRIPTION

User Comments


CORE METADATA FIELDS

User Comments


epmid (id)

The text ID of the EPM package

User Comments


eprintid (int)

The ID number of the EPrint record from the EPM repository.

E.g. http://bazaar.eprints.org/.

User Comments


uri (url)

The URI of the EPM package from the EPM repository it is hosted.

E.g. http://bazaar.eprints.org/id/epm/reports

User Comments


version (text)

The version (e.g. 1.0.0) of the EPM package.

User Comments


controller (text)

User Comments


creators (compound, multiple)

Creators of the EPM package including both their full name and email address.

User Comments


datestamp (time)

The date and time this version of this EPM package was published.

User Comments


title (longtext)

The title of this EPM package.

User Comments


description (longtext)

The description of this EPM package and its purpose.

User Comments


requirements (longtext)

A description of the requirements for this EPM package.

User Comments


home_page (url)

A URL for the home page of the EPM package. Maybe a page including documentation on how to use the EPM package.

User Comments


icon (url)

A URL for the icon for the EPM package.

User Comments


REFERENCES AND RELATED OBJECTS

User Comments


documents (subobject, multiple)

The documents for this EPM package. Effectively a manifest of files required to install the EPM om a repository.

User Comments


INSTANCE VARIABLES

See EPrints::DataObj.

User Comments


METHODS

User Comments


Constructor Methods

User Comments


new

$epm = EPrints::DataObj::EPM->new( $repo, $id )

Returns a new object representing the installed EPM package $id.

User Comments


new_from_data

$epm = EPrints::DataObj::EPM->new_from_data( $repo, $epdata, $dataset )

Returns a new object representing the EPM package based on the $epdata and $dataset.

User Comments


new_from_data

$epm = EPrints::DataObj::EPM->new_from_data( $repo, $xml )

Returns a new object representing the EPM package based on the $xml provided.

User Comments


new_from_data

$epm = EPrints::DataObj::EPM->new_from_data( $repo, $fh )

Returns a new object representing the EPM package based on the XML from the file handle $fh provided.

User Comments


new_from_manifest

$epm = EPrint::DataObj::EPM->new_from_manifest( $repo, $epdata, [ @manifest ] )

Makes and returns a new EPM object based on the $epdata and a manifest of installable files.

User Comments


Class Methods

User Comments


get_system_field_info

$metadata = EPrints::DataObj::EPM->get_system_field_info

Returns an array describing the system metadata of the epm dataset.

User Comments


get_dataset_id

$dataset = EPrints::DataObj::EPM->get_dataset_id

Returns the ID of the EPrints::DataSet object to which this record belongs.

User Comments


render_controller

$xhtml = EPrints::DataObj::EPM::render_controller( $repo, $field, $value, under, undef, $epm )

Returns and XHTML DOM object rendering for the action link of the EPM using the screen plugin with name supplied by $value.

User Comments


render_icom

$xhtml = EPrints::DataObj::EPM::render_icom( $repo, $field, $value, under, undef, $epm )

Returns and XHTML DOM object rendering for the icon of the EPM using the image with the filename supplied by $value.

User Comments


map

EPrints::DataObj::EPM->map( $repo, $f, $ctx )

Apply a function $f over all installed EPMs with and only context $ctx, which is not currently implemented.

 sub {
   my( $repo, $dataset, $epm, [ $ctx ] ) = @_;
 }
 

This loads the EPM index files only.

User Comments


Object Methods

User Comments


commit

$epm->commit

Commit any changes to the installed .epm, .epmi files.

User Comments


rebuild

$epm->rebuild

Reload all of the installed files (regenerating hashes if necessary).

User Comments


version

$v = $epm->version

Returns a stringified version suitable for string gt/lt matching.

User Comments


is_enabled

$bool = $epm->is_enabled

Returns true if the EPM is enabled for the current repository.

User Comments


repositories

@repoids = $epm->repositories

Returns a list of repository IDs in which this EPM is enabled.

User Comments


package_filename

$filename = $epm->package_filename

Returns the complete package filename.

User Comments


epm_dir

$dir = $epm->epm_dir

Path to the epm directory for this EPM.

User Comments


installed_files

@files = $epm->installed_files

Returns a list of installed files as EPrints::DataObj::File.

User Comments


repository_files

@files = $epm->repository_files

Returns the list of configuration files used to enable/configure this EPM.

User Comments


control_screen

$screen = $epm->control_screen( %params )

Returns the control screen for this EPM. %params are passed to the plugin constructor.

User Comments


serialise

$epm->serialise( $fh, [ $files ] )

Serialises this EPM to the open file handle $fh. If $files is true file contents are included.

User Comments


url_stem

$url_stem = $epm->url_stem

Returns the URL stem for this EPM. Always just an empty string.

User Comments


html_phrase

$xhtml_phrase = $epm->html_phrase( $phraseid, [ @pins ] )

Returns and XHTML DOM oject of the HTML phrase for and EPM with the $phraseid using the @pins provided if required.

User Comments


install

$ok = $epm->install( $handler, [ $force ] )

Install the EPM into the system. $handler is a EPrints::CLIProcessor or EPrints::ScreenProcessor, used for reporting errors.

$force ignores checking the hashes of the files to make sure they have not been changed.

Returns boolean dependent on whether install was successful.

User Comments


uninstall

$ok = $epm->uninstall( $handler, [ $force ] )

Remove the EPM from the system. $handler is a EPrints::CLIProcessor or EPrints::ScreenProcessor, used for reporting errors.

$force ignores checking the hashes of the files to make sure they have not been changed.

Returns boolean dependent on whether uninstall was successful.

User Comments


disable_unchanged

$ok = $epm->disable_unchanged

Remove unchanged files from the repository directory. This allows a new version of the EPM to be installed/enabled.

Returns boolean dependent on whether disabling unchanged was successful.

User Comments


enable

$ok = $epm->enable( $handler )

Enables the EPM for the current repository using $handler to manage messaging for the enabling process.

Returns boolean dependent on whether enabling was successful.

User Comments


enable

$ok = $epm->enable( $handler )

Enables the EPM for the current repository using $handler to manage messaging for the disabling process.

Returns boolean dependent on whether disabling was successful.

User Comments


current_counters

$conf = $epm->current_counters

Get SQL counters for current data objects.

User Comments


current_datasets

$conf = $epm->current_datasets

Get dataset for current data objects.

User Comments


update_counters

$ok = $epm->update_counters( $before )

Update the SQL counters. Removing any counters listed in $before that are not used any more. ($before should be retrieved before enabling by using current_counters.)

User Comments


update_datasets

$ok = $epm->update_datasets( $before )

Update the datasets following any configuration changes made by the extension on being enabled. Removing any datasets listed in $before that are not used any more. $before should be retrieved before enabling by using current_datasets.

User Comments


publish

$ok = $epm->publish( $handler, $url, %opts )

Publish this EPM to a remote system using SWORD, using $handler to manage messaging for the publishing process.

$url is the URL of the SWORD endpoint or a page containing a SWORD link.

Options:

username - username for Basic auth
password - password for Basic auth
 

Returns a boolean dependent on whether the publishing was successful.

User Comments


is_set

$ok = $epm->is_set( $fieldid )

Returns a boolean dependent on whether a value is set for the field with $fieldid for this EPM.

User Comments


Utility Methods

User Comments


render_controller

$xhtml = EPrints::DataObj::EPM::render_controller( $repo, $field, $value, under, undef, $epm )

Returns and XHTML DOM object rendering for the action link of the EPM using the screen plugin with name supplied by $value.

User Comments


render_icom

$xhtml = EPrints::DataObj::EPM::render_icom( $repo, $field, $value, under, undef, $epm )

Returns and XHTML DOM object rendering for the icon of the EPM using the image with the filename supplied by $value.

User Comments


SEE ALSO

EPrints::DataObj and EPrints::DataSet

User Comments


COPYRIGHT

© Copyright 2022 University of Southampton.

EPrints 3.4 is supplied by EPrints Services.

http://www.eprints.org/eprints-3.4/

LICENSE

This file is part of EPrints 3.4 http://www.eprints.org/.

EPrints 3.4 and this file are released under the terms of the GNU Lesser General Public License version 3 as published by the Free Software Foundation unless otherwise stated.

EPrints 3.4 is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with EPrints 3.4. If not, see http://www.gnu.org/licenses/.

User Comments