woko.ext.usermanagement.facets.usermanager.RenderUserProperties Maven / Gradle / Ivy
/*
* Copyright 2001-2012 Remi Vankeisbelck
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package woko.ext.usermanagement.facets.usermanager;
import net.sourceforge.jfacets.IFacetDescriptorManager;
import net.sourceforge.jfacets.annotations.FacetKey;
import woko.ext.usermanagement.core.User;
import woko.facets.builtin.WokoFacets;
import woko.facets.builtin.all.RenderPropertiesImpl;
import woko.persistence.ObjectStore;
import woko.users.UserManager;
import woko.users.UsernameResolutionStrategy;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
@FacetKey(name= WokoFacets.renderProperties, profileId="all", targetObjectType = User.class)
public class RenderUserProperties<
OsType extends ObjectStore,
UmType extends UserManager,
UnsType extends UsernameResolutionStrategy,
FdmType extends IFacetDescriptorManager
> extends RenderPropertiesImpl {
@Override
public List getPropertyNames() {
List all = super.getPropertyNames();
ArrayList withoutPassword = new ArrayList(all);
withoutPassword.remove("password");
return Collections.unmodifiableList(withoutPassword);
}
}