18 require_once SQ_INCLUDE_PATH.
'/asset.inc';
34 public static $string_non_optional = Array (
41 public static $string_optional = Array (
48 public static $string_optional_unbounded= Array (
55 public static $boolean_non_optional = Array (
62 public static $boolean_optional = Array (
69 public static $int_non_optional = Array (
76 public static $int_optional = Array (
83 private $simple_types = NULL;
93 $this->_ser_attrs = TRUE;
94 parent::__construct($assetid);
111 if (!parent::_preCreateCheck($link))
return FALSE;
114 $name = trim($this->
attr(
'name'));
115 if (trim($this->
attr(
'short_name')) ==
'') {
134 protected function _getName($short_name=FALSE, $contextid=NULL)
137 if ($contextid === NULL) {
138 $contextid = $GLOBALS[
'SQ_SYSTEM']->getContextId();
142 $attr = ($short_name) ?
'short_name' :
'name';
143 $values = $GLOBALS[
'SQ_SYSTEM']->am->getAttributeValuesByName($attr, $this->
type(), Array($this->
id), $contextid);
144 if (empty($values) === TRUE) {
145 return parent::_getName($short_name, $contextid);
147 return $values[$this->id];
178 public static function getArgType($type, $min=0, $max=1, $nillable=FALSE, $mixed=FALSE)
184 'nillable' => $nillable,
202 $complex_elements_available = Array();
203 if (empty($func_list)) {
205 $func_list = $complex_elements;
207 foreach ($func_list as $func_name => $switch) {
208 if (isset($complex_elements[$func_name])) {
210 $complex_elements_available = array_merge($complex_elements_available, $complex_elements[$func_name]);
215 return $complex_elements_available;
228 $simple_types_available = Array();
229 if (empty($func_list)) {
231 $func_list = $simple_types;
233 foreach ($func_list as $func_name => $switch) {
234 if (isset($simple_types[$func_name])) {
236 $simple_types_available = array_merge($simple_types_available, $simple_types[$func_name]);
240 return $simple_types_available;
283 $val = array_get_index($array, $index, $default_val);
286 }
else if ($val == 1) {
306 $val = array_get_index($array, $index, $default_val);
326 $val = array_get_index($array, $index, $default_val);
327 if (empty($this->simple_types)) {
331 if (!empty($this->simple_types) && isset($this->simple_types[$index])) {
332 if (!in_array($val, $this->simple_types[$index][
'enumeration'])) {
333 throw new SoapFault(
'Server',
'The input value is not a valid value for '.$index.
'. Valid values include: '.implode(
', ', $this->simple_types[$index][
'enumeration']));
349 require_once SQ_SYSTEM_ROOT.
'/core/hipo/jobs/hipo_job_update_lookups.inc';
350 $hh = $GLOBALS[
'SQ_SYSTEM']->getHipoHerder();
352 $vars = Array(
'assetids' => Array($assetid));
353 $hh->freestyleHipo(
'hipo_job_update_lookups', $vars);