001/*
002 *  Licensed to the Apache Software Foundation (ASF) under one
003 *  or more contributor license agreements.  See the NOTICE file
004 *  distributed with this work for additional information
005 *  regarding copyright ownership.  The ASF licenses this file
006 *  to you under the Apache License, Version 2.0 (the
007 *  "License"); you may not use this file except in compliance
008 *  with the License.  You may obtain a copy of the License at
009 *
010 *        http://www.apache.org/licenses/LICENSE-2.0
011 *
012 *  Unless required by applicable law or agreed to in writing,
013 *  software distributed under the License is distributed on an
014 *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
015 *  KIND, either express or implied.  See the License for the
016 *  specific language governing permissions and limitations
017 *  under the License.
018 */
019
020package org.apache.isis.core.progmodel.facetdecorators.i18n;
021
022import java.util.List;
023
024import org.apache.isis.applib.Identifier;
025import org.apache.isis.core.commons.components.ApplicationScopedComponent;
026
027/**
028 * Authorises the user in the current session view and use members of an object.
029 * 
030 * <p>
031 * TODO: allow description and help to be found for parameters
032 */
033public interface I18nManager extends ApplicationScopedComponent {
034
035    /**
036     * Get the localized name for the specified identified action/property.
037     * 
038     * <p>
039     * Returns null if no name available.
040     */
041    String getName(Identifier identifier);
042
043    /**
044     * Get the localized description for the specified identified
045     * action/property.
046     * 
047     * <p>
048     * Returns null if no description available.
049     */
050    String getDescription(Identifier identifier);
051
052    /**
053     * Get the localized help text for the specified identified action/property.
054     * 
055     * <p>
056     * Returns null if no help text available.
057     */
058    String getHelp(Identifier identifier);
059
060    /**
061     * Get the localized parameter names for the specified identified
062     * action/property.
063     * 
064     * <p>
065     * Returns null if no parameters are available. Otherwise returns an array
066     * of String objects the size of the number of parameters, where each
067     * element is the localised name for the corresponding parameter, or is null
068     * if no parameter name is available.
069     */
070    List<String> getParameterNames(Identifier identifier);
071}