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
020 package org.apache.isis.core.progmodel.facetdecorators.i18n;
021
022 import java.util.List;
023
024 import org.apache.isis.applib.Identifier;
025 import 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 */
033 public 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 action/property.
045 *
046 * <p>
047 * Returns null if no description available.
048 */
049 String getDescription(Identifier identifier);
050
051 /**
052 * Get the localized help text for the specified identified action/property.
053 *
054 * <p>
055 * Returns null if no help text available.
056 */
057 String getHelp(Identifier identifier);
058
059 /**
060 * Get the localized parameter names for the specified identified action/property.
061 *
062 * <p>
063 * Returns null if no parameters are available. Otherwise returns an array of String objects the size of the number
064 * of parameters, where each element is the localised name for the corresponding parameter, or is null if no
065 * parameter name is available.
066 */
067 List<String> getParameterNames(Identifier identifier);
068 }