|
FUNCTION allowed_translations (ent : GENERIC, translatable_attributes : SET [0:?] OF STRING) : LOGICAL; LOCAL mlaa : BAG OF multi_language_attribute_assignment ; ala : BAG OF attribute_language_assignment ; END_LOCAL ; IF ( SIZEOF ( translatable_attributes ) = 0 ) THEN RETURN ( UNKNOWN ) ; END_IF ; mlaa := USEDIN ( ent , 'catalog_data_information_mim' + '.multi_language_attribute_assignment.items' ) ; REPEAT i := 1 TO HIINDEX ( mlaa ) ; IF NOT ( mlaa [ i ] . attribute_name IN translatable_attributes ) THEN RETURN ( FALSE ) ; END_IF ; END_REPEAT ; ala := USEDIN ( ent , 'catalog_data_information_mim' + '.attribute_language_assignment.items' ) ; REPEAT i := 1 TO HIINDEX ( ala ) ; IF NOT ( ala [ i ] . attribute_name IN translatable_attributes ) THEN RETURN ( FALSE ) ; END_IF ; END_REPEAT ; RETURN ( TRUE ) ; END_FUNCTION; -- allowed_translations |
|
public class FAllowed_translations public static Value run(SdaiContext _context, Value ent, Value translatable_attributes) |